Using Public Container Registry
In this section we will go through a few steps to use your own registry and associated credentials.
Since most public container registries shape/rate-limit download, it may be essential to you use a private registry or use your login credentials to download container images from a public registry (Docker, etc).
In kubernets, we can configure the service accounts to use your public registry credentials to download container images. The steps include the following:
- Create a generic kubernetes secret in your namespace with public registry credentials - this will become your pull secret
- Associate a kubernetes service account to use your pull secret
Create a Container Pull Secret
- Login to your Linux Tools VM
- Authenticate to your kubernetes cluster using the kubeconfig file your downloaded from Karbon
- Change to the namespace you would like to use
- Create a pull secret using your Docker account
Associate Pull Secret with Service Account
- Associate pull secret with the service account your will be using
-
Verify if the serviceaccount is using your
regcreddocker registy secretCommand output6. Now your yaml manifest can use this secret to download container imagesapiVersion: v1 kind: ServiceAccount metadata: name: default namespace: default uid: 052fb0f4-3d50-11e5-b066-42010af0d7b6 imagePullSecrets: - name: regcred
You can now use your docker credentials to download container images from Docker public registry.