Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to pull image #1255

Open
yoelvd opened this issue May 29, 2023 · 0 comments
Open

Failed to pull image #1255

yoelvd opened this issue May 29, 2023 · 0 comments

Comments

@yoelvd
Copy link

yoelvd commented May 29, 2023

Greetings team and thanks in advance for your time, If I pull legacy image everything works correctly but.. if I try to test stargz image in pod definition it throws this error. What could be the reason ?

Pod def:

kind: Pod
metadata:
  name: nodejs
spec:
  containers:
  - name: nodejs-stargz
    image: ghcr.io/stargz-containers/node:17.8.0-esgz
    command: ["node"]
    args:
    - -e
    - var http = require('http');
      http.createServer(function(req, res) {
        res.writeHead(200);
        res.end('Hello World!\n');
      }).listen(80);
    ports:
    - containerPort: 80

Describing pod:

Events:
  Type     Reason     Age   From               Message
  ----     ------     ----  ----               -------
  Normal   Scheduled  21s   default-scheduler  Successfully assigned default/nodejs to stargz-demo-control-plane
  Normal   Pulling    18s   kubelet            Pulling image "ghcr.io/stargz-containers/node:17.8.0-esgz"
  Warning  Failed     2s    kubelet            Failed to pull image "ghcr.io/stargz-containers/node:17.8.0-esgz": rpc error: code = Unknown desc = failed to pull and unpack image "ghcr.io/stargz-containers/node:17.8.0-esgz": failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:49f7996013b1d577d010fd1f81778f7c5143e74656b0f5e797a75782abe13b98?se=2023-05-29T14%3A25%3A00Z&sig=79gm13k7Pyl0M9bAAjRJWPZIDfcMauk4PUSVcqLlkQA%3D&sp=r&spr=https&sr=b&sv=2019-12-12": net/http: TLS handshake timeout
  Warning  Failed     2s    kubelet            Error: ErrImagePull
  Normal   BackOff    2s    kubelet            Back-off pulling image "ghcr.io/stargz-containers/node:17.8.0-esgz"
  Warning  Failed     2s    kubelet            Error: ImagePullBackOff

Cluster created with this:
`kind create cluster --name stargz-demo --image ghcr.io/containerd/stargz-snapshotter:0.14.3-kind`

kubectl version right now:
`kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.27.2
Kustomize Version: v5.0.1
Server Version: v1.26.0`

KinD version:
`kind version
kind v0.19.0 go1.20.4 linux/amd64`

Checking stargz config for containerd:
docker exec -it stargz-demo-control-plane bash
root@stargz-demo-control-plane:/# cat /etc/containerd/config.toml 
# See also: https://github.com/kubernetes-sigs/kind/blob/fd64a56b0c3d5654eb6d22bce812e2a87eac5853/images/base/files/etc/containerd/config.toml

# explicitly use v2 config format
version = 2

# - Set default runtime handler to v2, which has a per-pod shim
# - Enable to use stargz snapshotter
[plugins."io.containerd.grpc.v1.cri".containerd]
  default_runtime_name = "runc"
  snapshotter = "stargz"
  disable_snapshot_annotations = false
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
  runtime_type = "io.containerd.runc.v2"

# Setup a runtime with the magic name ("test-handler") used for Kubernetes
# runtime class tests ...
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.test-handler]
  runtime_type = "io.containerd.runc.v2"

# Use stargz snapshotter
[proxy_plugins]
  [proxy_plugins.stargz]
    type = "snapshot"
    address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant