Alright, so I am trying to publish a private docker image to kubernetes, and I am running into some odd issues.
I start of with logging into docker
docker login -u $DOCKER_USER -p $DOCKER_TOKEN
and that will store my password in a config file for me, so I run this
kubectl create secret generic regcred --from-file=/root/.docker/config.json --type=kubernetes.io/dockerconfigjson
I would expect that to pick up the url in the config.json
file, but I get this error
The connection to the server localhost:8080 was refused - did you specify the right host or port?
So I thought that I might as well specify the server
kubectl create secret generic regcred --from-file=/root/.docker/config.json --type=kubernetes.io/dockerconfigjson --server=https://index.docker.io/v1/
But still no luck.
error: EOF
2020-01-12T19:45:39.7433187Z stdout P Please enter Username:
and since this is running on a build server, I cannot enter the username.
So what am I missing here?