This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I'm stuck trying to get the most basic private docker repository at ghcr.io to download images into minikube.
I've got a token that works for docker from github. I set the token to write:packages, delete:packages, and along the way that picks up read:packages. I followed these instructions: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
What I CAN do:
- Upload docker image with the token. It's Alpine with a couple of extra packages.
- Docker pull image using the *exact* url from the kubernetes file and the token.
- docker log out, then docker log into the repo with the token.
What I've tried:- Added secrets to the namespace, specified them in the pod file.- Used directions from here to create the secret: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
What I cannot do:Deploy a pod with the image.Error message:Error response from daemon: Head "https://ghcr.io/v2/my-user-name/my-prometheus/manifests/1.0": unauthorized
apiVersion: v1
kind: Pod
metadata:
name: private-reg
namespace: monitoring
spec:
containers:
- name: foo
image:
ghcr.io/marquis-of-sandwiches/mp-prometheus:1.0
imagePullSecrets:
- name: regcred1
Here's logging from kubectl describe pod
Warning Failed 30m (x4 over 31m) kubelet Failed to pull image "ghcr.io/my-user-name/my-prometheus:1.0": rpc error: code = Unknown desc = Error response from daemon: Head "https://ghcr.io/v2/my-user-name/my-prometheus/manifests/1.0": unauthorized
Warning Failed 30m (x4 over 31m) kubelet Error: ErrImagePull
Warning Failed 30m (x6 over 31m) kubelet Error: ImagePullBackOff
Any ideas would be great
Subreddit
Post Details
- Posted
- 10 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/kubernetes/...