|
1 | 1 | import Deprecated from "../partials/helm/_replicated-deprecated.mdx"
|
2 | 2 | import StepCreds from "../partials/proxy-service/_step-creds.mdx"
|
3 | 3 | import StepCustomDomain from "../partials/proxy-service/_step-custom-domain.mdx"
|
| 4 | +import RewriteHelmValues from "../partials/proxy-service/_step-rewrite-helm-values.mdx" |
| 5 | +import AdditionalNs from "../partials/proxy-service/_step-additional-ns.mdx" |
| 6 | +import InjectPullSecret from "../partials/proxy-service/_step-inject-pull-secret.mdx" |
4 | 7 |
|
5 |
| -# Use the Proxy Registry with KOTS Installations |
| 8 | +# Use the Proxy Registry with Replicated Installers |
6 | 9 |
|
7 |
| -This topic describes how to use the Replicated proxy registry with applications deployed with Replicated KOTS. |
| 10 | +This topic describes how to use the Replicated proxy registry for applications deployed with Replicated installers (Embedded Cluster, KOTS existing cluster, or kURL). For more information about the proxy registry, see [About the Replicated Proxy Registry](private-images-about). |
8 | 11 |
|
9 |
| -## Overview |
| 12 | +## Configure Your Application to Use the Proxy Registry |
10 | 13 |
|
11 |
| -Replicated KOTS automatically creates the required image pull secret for accessing the Replicated proxy registry during application deployment. When possible, KOTS also automatically rewrites image names in the application manifests to the location of the image at `proxy.replicated.com` or your custom domain. |
| 14 | +These steps assume that you package your application with Helm and that you install with the KOTS [HelmChart v2](/reference/custom-resource-helmchart-v2) custom resource. |
12 | 15 |
|
13 |
| -### Image Pull Secret |
| 16 | +If you are installing with the HelmChart v1 custom resource, or if your application is not packaged with Helm, there are different steps for configuring your application to use the proxy registry. See [Configure Other Application Types](#other) below. |
14 | 17 |
|
15 |
| -During application deployment, KOTS automatically creates an `imagePullSecret` with `type: kubernetes.io/dockerconfigjson` that is based on the customer license. This secret is used to authenticate with the proxy registry and grant proxy access to private images. |
| 18 | +To configure your application to use the proxy registry for installations with a Replicated installer: |
16 | 19 |
|
17 |
| -For information about how Kubernetes uses the `kubernetes.io/dockerconfigjson` Secret type to authenticate to a private image registry, see [Pull an Image from a Private Registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) in the Kubernetes documentation. |
| 20 | +1. <StepCreds/> |
| 21 | + |
| 22 | +1. <StepCustomDomain/> |
| 23 | + |
| 24 | +1. <RewriteHelmValues/> |
| 25 | + |
| 26 | +1. <InjectPullSecret/> |
| 27 | + |
| 28 | +1. Repeat steps 3 and 4 for each Helm chart used by your application. |
| 29 | + |
| 30 | +1. <AdditionalNs/> |
18 | 31 |
|
19 |
| -### Image Location Patching (Standard Manifests and HelmChart v1) |
| 32 | +1. Create a new release with your changes. Promote the release to a development channel. See [Managing Releases with Vendor Portal](releases-creating-releases). |
20 | 33 |
|
21 |
| -For applications packaged with standard Kubernetes manifests (or Helm charts deployed with the [HelmChart v1](/reference/custom-resource-helmchart) custom resource), KOTS automatically patches image names to the location of the image at at `proxy.replicated.com` or your custom domain during deployment. If KOTS receives a 401 response when attempting to load image manifests using the image reference from the PodSpec, it assumes that this is a private image that must be proxied through the proxy registry. |
| 34 | +1. Install in a development environment to test your changes. |
| 35 | + |
| 36 | +## Configure Other Application Types {#other} |
| 37 | + |
| 38 | +If you are installing with the HelmChart v1 custom resource, or if your application is not packaged with Helm, there are different steps for configuring your application to use the proxy registry. |
| 39 | + |
| 40 | +### HelmChart v1 or Standard Manifests |
| 41 | + |
| 42 | +:::note |
| 43 | +<Deprecated/> |
| 44 | +::: |
| 45 | + |
| 46 | +To use the proxy registry with HelmChart v1 or applications packaged with standard manifests: |
| 47 | + |
| 48 | +1. <StepCreds/> |
| 49 | + |
| 50 | +1. <StepCustomDomain/> |
| 51 | + |
| 52 | +1. <AdditionalNs/> |
| 53 | + |
| 54 | +1. Create a new release with your changes. Promote the release to a development channel. See [Managing Releases with Vendor Portal](releases-creating-releases). |
| 55 | + |
| 56 | +1. Install in a development environment to test your changes. |
| 57 | + |
| 58 | +For applications packed with Kubernetes manifests and for Helm charts deployed with the [HelmChart v1](/reference/custom-resource-helmchart) custom resource, KOTS automatically rewrites image names and injects image pull secrets during deployment for these application types. No additional configuration is required to rewrite image names. |
| 59 | + |
| 60 | +<details> |
| 61 | + |
| 62 | +<summary>How does KOTS patch image names?</summary> |
| 63 | + |
| 64 | +KOTS automatically patches image names to the location of the image at at `proxy.replicated.com` or your custom domain during deployment. If KOTS receives a 401 response when attempting to load image manifests using the image reference from the PodSpec, it assumes that this is a private image that must be proxied through the proxy registry. |
22 | 65 |
|
23 | 66 | KOTS uses Kustomize to patch the `midstream/kustomization.yaml` file to change the image name during deployment to reference the proxy registry. For example, a PodSpec for a Deployment references a private image hosted at `quay.io/my-org/api:v1.0.1`:
|
24 | 67 |
|
@@ -47,29 +90,20 @@ images:
|
47 | 90 | - name: quay.io/my-org/api:v1.0.1
|
48 | 91 | newName: proxy.replicated.com/proxy/my-kots-app/quay.io/my-org/api
|
49 | 92 | ```
|
| 93 | +</details> |
50 | 94 |
|
51 |
| -## Enable the Proxy Registry |
52 |
| - |
53 |
| -This section describes how to enable the proxy registry for applications deployed with KOTS, including how to ensure that image names are rewritten and that the required image pull secret is provided. |
| 95 | +### Kubernetes Operators |
54 | 96 |
|
55 |
| -To enable the proxy registry: |
| 97 | +To use the proxy registry with applications packaged as Kubernetes Operators: |
56 | 98 |
|
57 | 99 | 1. <StepCreds/>
|
58 | 100 |
|
59 | 101 | 1. <StepCustomDomain/>
|
60 | 102 |
|
61 |
| -1. Rewrite images names to the location of the image at `proxy.replicated.com` or your custom domain. Also, ensure that the correct image pull secret is provided for all private images. The steps required to configure image names and add the image pull secret vary depending on your application type: |
62 |
| - |
63 |
| - * **HelmChart v2**: For Helm charts deployed with the[ HelmChart v2](/reference/custom-resource-helmchart-v2) custom resource, configure the HelmChart v2 custom resource to dynamically update image names in your Helm chart and to inject the image pull secret that is automatically created by KOTS. For instructions, see [Configure the HelmChart Custom Resource v2](/vendor/helm-native-v2-using). |
64 |
| - |
65 |
| - * **Standard Manifests or HelmChart v1**: For standard manifest-based applications or Helm charts deployed with the [HelmChart v1](/reference/custom-resource-helmchart) custom resource, no additional configuration is required. KOTS automatically rewrites image names and injects image pull secrets during deployment for these application types. |
66 |
| - |
67 |
| - :::note |
68 |
| - <Deprecated/> |
69 |
| - ::: |
| 103 | +1. <AdditionalNs/> |
70 | 104 |
|
71 |
| - * **Kubernetes Operators**: For applications packaged with Kubernetes Operators, KOTS cannot modify pods that are created at runtime by the Operator. To support the use of private images in all environments, the Operator code should use KOTS functionality to determine the image name and image pull secrets for all pods when they are created. For instructions, see [Reference Images](/vendor/operator-referencing-images) in the _Packaging Kubernetes Operators_ section. |
| 105 | +1. For applications packaged with Kubernetes Operators, KOTS cannot modify pods that are created at runtime by the Operator. To support the use of private images in all environments, the Operator code should use KOTS functionality to determine the image name and image pull secrets for all pods when they are created. For instructions, see [Reference Images](/vendor/operator-referencing-images) in the _Packaging Kubernetes Operators_ section. |
72 | 106 |
|
73 |
| -1. If you are deploying Pods to namespaces other than the application namespace, add the namespace to the `additionalNamespaces` attribute of the KOTS Application custom resource. This ensures that KOTS can provision the `imagePullSecret` in the namespace to allow the Pod to pull the image. For instructions, see [Define Additional Namespaces](operator-defining-additional-namespaces). |
| 107 | +1. Create a new release with your changes. Promote the release to a development channel. See [Managing Releases with Vendor Portal](releases-creating-releases). |
74 | 108 |
|
75 |
| -1. (Optional) Add a custom domain for the proxy registry instead of `proxy.replicated.com`. See [Use Custom Domains](custom-domains-using). |
| 109 | +1. Install in a development environment to test your changes. |
0 commit comments