Skip to content

Instantly share code, notes, and snippets.

@cmoulliard
Last active April 13, 2023 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmoulliard/83f1ed1664d6f8bc96f1976c3b8d3263 to your computer and use it in GitHub Desktop.
Save cmoulliard/83f1ed1664d6f8bc96f1976c3b8d3263 to your computer and use it in GitHub Desktop.
Commands used top of kind + docker registry
rm -rf $HOME/.docker/certs.d/registry.local:5000 
./kind-tls-secured-reg.sh

ls -la $HOME/.docker/certs.d
docker ps

docker pull gcr.io/google-samples/hello-app:1.0
docker tag gcr.io/google-samples/hello-app:1.0 kind-registry:5000/google-samples/hello-app:1.0

docker logout kind-registry:5000
docker login kind-registry:5000 -u admin -p snowdrop
docker push kind-registry:5000/google-samples/hello-app:1.0

kubectl delete secret regcred
kubectl create secret docker-registry regcred --docker-server=kind-registry:5000 --docker-username=admin --docker-password=snowdrop
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regcred"}]}'
kubectl delete deployment hello
kubectl create deployment hello --image=kind-registry:5000/google-samples/hello-app:1.0

kubectl get pod -lapp=hello
NAME                     READY   STATUS    RESTARTS   AGE
hello-7689699f4b-mbrr2   1/1     Running   0          21s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment