Image security for CKA

Create a secret object with the credentials required to access the registry

Name: private-reg-cred
Username: dock_user
Password: dock_password
Email: dock_user@myprivateregistry.comCheck

  • Secret: private-reg-cred
  • Secret Type: docker-registry
  • Secret Data
kubectl create secret docker-registry NAME --docker-username=user --docker-password=password --docker-email=email
[--docker-server=string] [--from-literal=key1=value1] [--dry-run=server|client|none] [options]
kubectl create secret docker-registry private-reg-cred --docker-username=dock_user --docker-password=dock_password

Edit deployment using kubectl edit deploy web command and add imagePullSecrets section. Use private-reg-cred

Leave a Reply

Your email address will not be published.