Skip to content

Instantly share code, notes, and snippets.

@kreitje
Created April 22, 2019 18:20
Show Gist options
  • Save kreitje/70a798f0cd80fba9d1fdd4a2f333371e to your computer and use it in GitHub Desktop.
Save kreitje/70a798f0cd80fba9d1fdd4a2f333371e to your computer and use it in GitHub Desktop.
Minikube authorize docker hub
kubectl create secret docker-registry --dry-run=true regcred \
--docker-server=https://index.docker.io/v1/ \
--docker-username=$USERNAME \
--docker-password=$PASSWORD \
--docker-email=$EMAIL -o yaml > docker-secret.yaml
#Then run
kubectl apply -f docker-secret.yaml
#Then in the spec -> template -> spec add imagePullSecrets: with a -name: regcred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment