1

According to this document

https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

one could create a docker registry by running:

kubectl create secret docker-registry regcred \
--docker-server=<your-registry-server> \
--docker-username=<your-name> \
--docker-password=<your-pword> --docker-email=<your-email>

How to create a secret without entering the password as plain text?

0

It is possible to create a secret without passing on the commandline by reading it from file:

$ kubectl create secret generic ssh-key-secret \
  --from-file=ssh-privatekey=/path/to/.ssh/id_rsa \
  --from-file=ssh-publickey=/path/to/.ssh/id_rsa.pub

See https://kubernetes.io/docs/concepts/configuration/secret/ for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.