I've been using GKE to deploy some public images, such as redis and postgres. But I've been running into an interesting problem where it does not pull images, seemingly with specific tags. The error I keep getting is:
Failed to pull image "postgres:alpine": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I've been trying to discover a pattern in ones that work and ones that don't, seems that ones without any tags always work; Some examples of images that have worked:
redis:alpine
postgres
And ones that haven't:
postgres:alpine
postgres:12
I verified that I can pull all these images to my local machine using docker pull
.
Here's an example deployment kube file that I used:
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
labels:
app: postgres
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- image: postgres:alpine
name: postgres
ports:
- containerPort: 5432
name: postgres
I'm hoping I missed something very obvious. Cheers.