profile
viewpoint

Ask questionsCache Docker images

<!-- Consider also checking https://kind.sigs.k8s.io/#community-discussion-contribution-and-support for support, our slack community is especially helpful! --> I have an slow internet connection so I'm trying to cache the Docker images used in my deployments in kind cluster.

For example, If my deployment references gcr.io/kuar-demo/kuard-amd64:blue image I tried:

$ docker pull gcr.io/kuar-demo/kuard-amd64:blue
$ kind load docker-image gcr.io/kuar-demo/kuard-amd64:blue --name kind
$ cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kuard
  labels:
    app: kuard
spec:
  replicas: 3
  selector:
    matchLabels:
      app: kuard
  template:
    metadata:
      labels:
        app: kuard
    spec:
      containers:
      - name: kuard
        image: gcr.io/kuar-demo/kuard-amd64:blue
        ports:
        - containerPort: 8080
EOF

But looks like the image is always downloaded from dockerhub by the node's containerd.

I couldn't find specific documentation about kind load docker-image but thought this was the purpose (to install the local image in the nodes that do not have It already).

The only thing I could find related to my problem is an issue in minkube.

Is this possible? Or my assumptions are wrong?

Environment:

  • kind version: (use kind version):
kind v0.8.0 go1.14.2 linux/amd64
  • Kubernetes version: (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:56:40Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-30T20:19:45Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
  • Docker version: (use docker info):
Client:
 Debug Mode: false

Server:
 Containers: 11
  Running: 5
  Paused: 0
  Stopped: 6
 Images: 86
 Server Version: 19.03.8
 Storage Driver: overlay2
  Backing Filesystem: <unknown>
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.3.0-51-generic
 Operating System: Ubuntu 19.10
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 15.53GiB
 Name: tluportatil082
 ID: 77FN:SH5V:Z2NG:P64K:S7YC:IRIO:GOXY:KNL5:ODQB:K4GX:N25N:4XFZ
 Docker Root Dir: /media/data/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  nexus.treelogic.local:8082
  nexus.treelogic.local:8083
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

WARNING: No swap limit support
  • OS (e.g. from /etc/os-release):
NAME="Ubuntu"
VERSION="19.10 (Eoan Ermine)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.10"
VERSION_ID="19.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=eoan
UBUNTU_CODENAME=eoan
kubernetes-sigs/kind

Answer questions BenTheElder

I'm not sure why you're seeing network traffic that looks like something is being downloaded but that's not a lot to go on, on my end I don't see anything wrong happening here. We do not have the minikube bug.

useful!

Related questions

Cluster not starting with DIND setup hot 1
Appears when using ceph of roook: map failed: (30) Read-only file system hot 1
Errors compile: version "go1.12.1" does not match go tool version "go1.10.2" hot 1
Installing Istio fails when trying to match resources hot 1
Helm: rabbitmq-ha deployment fails to discover k8s nodes hot 1
`kind` should be able to start the control plane when `/dev/kmsg` is not available hot 1
WSLv1: No DNS between pods or to the internet hot 1
Github User Rank List