Azure / container-service-for-azure-china

Container Service for Azure China
MIT License
422 stars 73 forks source link

Mirror of nginx ingress #65

Closed zhiweiv closed 4 years ago

zhiweiv commented 4 years ago

Recently nginx ingress moved it's image repo from us.gcr.io/k8s-artifacts-prod/ingress-nginx/controller to k8s.gcr.io/ingress-nginx/controller(https://github.com/kubernetes/ingress-nginx/commit/8102fff242cfe2499779a75facc9679814b77b0c). Do we have mirror for the new repo?

andyzhangx commented 4 years ago

the exact address is as following gcr.azk8s.cn/google_containers/ingress-nginx/nginx, it looks like we don't support sha256 tag image pulling on proxy server, do you know the exact version of ingress-nginx/nginx image, I tried to use latest, while it's not found:

$ sudo docker pull gcr.azk8s.cn/google_containers/ingress-nginx/nginx:v20200812-g0673e5e17@sha256:3bafc6840f2477c05eb029580fa8ecf4bd33b0f0765e3cd9cc82ad91f817ccf3
Error response from daemon: received unexpected HTTP status: 500 Internal Server Error
$ sudo docker pull gcr.azk8s.cn/google_containers/ingress-nginx/nginx
Using default tag: latest

Error response from daemon: manifest for gcr.azk8s.cn/google_containers/ingress-nginx/nginx:latest not found

Note: k8s.gcr.io would redirect to gcr.io/google-containers, following image urls are identical:

k8s.gcr.io/pause-amd64:3.1
gcr.io/google_containers/pause-amd64:3.1
andyzhangx commented 4 years ago

also I cannot find the original nginx image from https://console.cloud.google.com/gcr/images/google_containers/US

zhiweiv commented 4 years ago

The image is k8s.gcr.io/ingress-nginx/controller:v0.35.0:

  Normal  Scheduled  <unknown>  default-scheduler                           Successfully assigned default/test to aks-nodepool1-44093457-vmss000006
  Normal  Pulling    3m32s      kubelet, aks-nodepool1-44093457-vmss000006  Pulling image "k8s.gcr.io/ingress-nginx/controller:v0.35.0"
  Normal  Pulled     3m22s      kubelet, aks-nodepool1-44093457-vmss000006  Successfully pulled image "k8s.gcr.io/ingress-nginx/controller:v0.35.0"
  Normal  Created    3m7s       kubelet, aks-nodepool1-44093457-vmss000006  Created container test
  Normal  Started    3m6s       kubelet, aks-nodepool1-44093457-vmss000006  Started container test

The image I tried in 21v: gcr.azk8s.cn/google-containers/ingress-nginx/controller:v0.35.0:

  Normal   Scheduled  45s                default-scheduler                           Successfully assigned default/test to aks-nodepool1-54704948-vmss000002
  Normal   Pulling    27s (x2 over 43s)  kubelet, aks-nodepool1-54704948-vmss000002  Pulling image "gcr.azk8s.cn/google-containers/ingress-nginx/controller:v0.35.0"
  Warning  Failed     25s (x2 over 41s)  kubelet, aks-nodepool1-54704948-vmss000002  Failed to pull image "gcr.azk8s.cn/google-containers/ingress-nginx/controller:v0.35.0": rpc error: code = Unknown desc = Error response from daemon: manifest for gcr.azk8s.cn/google-containers/ingress-nginx/controller:v0.35.0 not found: manifest unknown: manifest unknown
  Warning  Failed     25s (x2 over 41s)  kubelet, aks-nodepool1-54704948-vmss000002  Error: ErrImagePull
  Normal   BackOff    12s (x2 over 40s)  kubelet, aks-nodepool1-54704948-vmss000002  Back-off pulling image "gcr.azk8s.cn/google-containers/ingress-nginx/controller:v0.35.0"
  Warning  Failed     12s (x2 over 40s)  kubelet, aks-nodepool1-54704948-vmss000002  Error: ImagePullBackOff

gcr.azk8s.cn/google_containers/ingress-nginx/nginx:v0.35.0 does not work also.

andyzhangx commented 4 years ago

so now k8s.gcr.io is not identical to gcr.io/google_containers, I think that's issue, need to set up a new proxy k8sgcr.azk8s.cn to get image from k8s.gcr.io

zhiweiv commented 4 years ago

Do you mean there will be a mirror for k8s.gcr.io in Azure 21V soon? Any ETA?

andyzhangx commented 4 years ago

will try to add this early next week

andyzhangx commented 4 years ago

it's ready now:

$ docker pull k8sgcr.azk8s.cn/ingress-nginx/controller:v0.35.0
v0.35.0: Pulling from ingress-nginx/controller
cbdbe7a5bc2a: Pull complete
d1671d9e0bb2: Pull complete
8889cff62ac0: Pull complete
938c06e274bc: Pull complete
e641e75c0259: Pull complete
40c8e2660528: Pull complete
bfbaa7fa4147: Pull complete
0494def36bda: Pull complete
78263fd98802: Pull complete
3ec522509fb0: Pull complete
4d6b574e7dab: Pull complete
8a96f210bac7: Pull complete
7a31fb6c9c22: Pull complete
235e2c0c638a: Pull complete
d49d59dcda4f: Pull complete
Digest: sha256:fc4979d8b8443a831c9789b5155cded454cb7de737a8b727bc2ba0106d2eae8b
Status: Downloaded newer image for k8sgcr.azk8s.cn/ingress-nginx/controller:v0.35.0