I have created a public docker image ghcr.io/windsource/nextcloud-influxdb-tracks-importer:1.0.0
.
Using docker without being logged in to ghcr.io I can pull that image using:
docker pull ghcr.io/windsource/nextcloud-influxdb-tracks-importer:1.0.0
When I use that image without image pull secrets in Kubernetes I get the error:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 46s default-scheduler Successfully assigned default/mypod to manjaro
Normal BackOff 21s (x2 over 44s) kubelet Back-off pulling image "ghcr.io/windsource/nextcloud-influxdb-tracks-importer:1.0.0"
Warning Failed 21s (x2 over 44s) kubelet Error: ImagePullBackOff
Normal Pulling 9s (x3 over 46s) kubelet Pulling image "ghcr.io/windsource/nextcloud-influxdb-tracks-importer:1.0.0"
Warning Failed 9s (x3 over 44s) kubelet Failed to pull image "ghcr.io/windsource/nextcloud-influxdb-tracks-importer:1.0.0": rpc error: code = Unknown desc = failed to pull and unpack image "ghcr.io/windsource/nextcloud-influxdb-tracks-importer:1.0.0": failed to resolve reference "ghcr.io/windsource/nextcloud-influxdb-tracks-importer:1.0.0": failed to authorize: failed to fetch anonymous token: unexpected status: 403 Forbidden
Warning Failed 9s (x3 over 44s) kubelet Error: ErrImagePull
Steps to reproduce:
curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644
k3s kubectl run -it mypod --image=ghcr.io/windsource/nextcloud-influxdb-tracks-importer:1.0.0 --restart=Never -- sh