hardkubectl

Create a Kubernetes secret for authenticating with a private container registry

command

kubectl create secret docker-registry REGISTRY_SECRET --docker-server SERVER --docker-username USER --docker-password PASS

also accepted

kubectl create secret docker-registry

Command breakdown

Part of the Kubernetes CLI (kubectl) — ConfigMaps & Secrets category.

kubectlcreatesecretdocker-registryREGISTRY_SECRET--docker-serverSERVER--docker-usernameUSER--docker-passwordPASS
FlagPurpose
--docker-serverBoolean flag
--docker-usernameBoolean flag
--docker-passwordBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →