Docker secret with empty username and password


#1

Hi,

I have a helm chart that references images from a docker registry that has anonymous pull access enabled. But due to an issue in Azure AKS, I need to create a secret with empty username and password and pass it to imagePullSecrets.

The below command works.
kubectl create secret generic emptysecret --from-literal=.dockerconfigjson=’{“auths”:{“dockerregistry”:{“Username”:"",“Password”:""}}}’ --type=kubernetes.io/dockerconfigjson

This does not work
kubectl create secret docker-registry mysecret --docker-server “dockerregistry” --docker-username “” --docker-password ""

Question is - can we take a dependency on the first command ?