Create kubectl secrets when pulling from private registry using crio

1.2k views Asked by At

I want to pull images from the private registry, as without docker need to do this step.

Any alternative to this command for crio:

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

This works when creating secrets and pulling using docker.

My requirement is to use create kubectl secrets for private registry url and pull images using Crio/crictl

...
imagePullSecrets:
  - name: regcred
1

There are 1 answers

0
Bguess On

Oh here is a strange question hahaha,

Your command should work even if it's not a dockerhub registry, you just have to configure your deployment to use the generated secret:

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

I mean this command don't have to be related to only dockerhub repo, It works with every private registry since you put the correct URL and credentials. If CRI-O is your container runtime no pb. Have you tried it?