Deploying images from a private container registry
To configure using a private container registry, you must:
- Create a list of Kubernetes secrets (imagePullSecrets) by using your registry credentials.
- Add those to the default .
- You must have a Kubernetes cluster with Knative Serving installed.
- You must have access to credentials for the private container registry where your container images are stored.
Procedure
Create a
imagePullSecrets
object that contains your credentials as a list of secrets:Where:
<registry-credential-secrets>
is the name that you want to use for your secrets (theimagePullSecrets
object). For example,container-registry
.<private-registry-email>
is the email address that is associated with the private registry.<private-registry-user>
is the username that you use to access the private container registry.<private-registry-password>
is the password that you use to access the private container registry.
Example:
After you have created the
imagePullSecrets
object, you can view the secrets by running:Add the to the
default
service account in thedefault
namespace.Note
By default, the
default
service account in each of the of your Knative cluster are used by your Revisions, unless the serviceAccountName is specified.New pods that are created in the
default
namespace now include your credentials and have access to your container images in the private registry.