CCE allows you to create workloads using images pulled from third-party image repositories.
Generally, a third-party image repository can be accessed only after authentication (using your account and password). CCE uses the secret-based authentication to pull images. Therefore, create a secret for an image repository before pulling images from the repository.
The node where the workload is running is accessible from public networks.
Click the cluster name to access the cluster console. In the navigation pane, choose ConfigMaps and Secrets. On the Secrets tab page, click Create Secret in the upper right corner. Set Secret Type to kubernetes.io/dockerconfigjson. For details, see Creating a Secret.
Enter the username and password used to access the third-party image repository.
kubectl create secret docker-registry myregistrykey -n default --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL
In the preceding command, myregistrykey indicates the key name, default indicates the namespace where the key is located, and other parameters are as follows:
apiVersion: v1 kind: Pod metadata: name: foo namespace: default spec: containers: - name: foo image: www.3rdregistry.com/janedoe/awesomeapp:v1 imagePullSecrets: - name: myregistrykey # Use the created secret.