antrea
antrea copied to clipboard
Running `kind-setup.sh` with no arguments fails to locate image
Describe the bug
When following the instructions given here and running kind-setup.sh
with no arguments (on KinD v0.14), the script is unable to locate and therefore load the image named projects.registry.vmware.com/antrea/antrea-ubuntu:latest
.
To Reproduce
- Have KinD v0.14 installed.
- Clone the antrea repo locally.
- Run
./ci/kind/kind-setup.sh create antrea
per documentation instructions. - See the following output printed (last line)
No kind clusters found.
Creating cluster "antrea" ...
â Ensuring node image (kindest/node:v1.24.0) đŧ
â Preparing nodes đĻ đĻ đĻ
â Writing configuration đ
â Starting control-plane đšī¸
â Installing StorageClass đž
â Joining worker nodes đ
Set kubectl context to "kind-antrea"
You can now use your cluster with:
kubectl cluster-info --context kind-antrea
Have a nice day! đ
deployment.apps/coredns patched
Configuring networks
Using default kind docker network
load images
docker image projects.registry.vmware.com/antrea/antrea-ubuntu:latest not found
- Observe that Antrea agent Pods never become ready
$ k get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system antrea-agent-9hjqn 0/2 Init:CrashLoopBackOff 5 (86s ago) 5m35s
kube-system antrea-agent-w95zm 0/2 Init:CrashLoopBackOff 5 (96s ago) 5m35s
kube-system antrea-agent-wklfx 0/2 Init:CrashLoopBackOff 5 (101s ago) 5m35s
kube-system antrea-controller-7d8bbd857-9r6wx 1/1 Running 0 5m36s
kube-system coredns-6d4b75cb6d-b2f5j 0/1 ContainerCreating 0 6m2s
kube-system coredns-b4b5969d4-fqqdc 0/1 ContainerCreating 0 5m41s
kube-system coredns-b4b5969d4-lfnx5 0/1 ContainerCreating 0 5m41s
kube-system etcd-antrea-control-plane 1/1 Running 0 6m16s
kube-system kube-apiserver-antrea-control-plane 1/1 Running 0 6m16s
kube-system kube-controller-manager-antrea-control-plane 1/1 Running 0 6m19s
kube-system kube-proxy-fpsxj 1/1 Running 0 6m3s
kube-system kube-proxy-ttj26 1/1 Running 0 5m57s
kube-system kube-proxy-vznxp 1/1 Running 0 5m44s
kube-system kube-scheduler-antrea-control-plane 1/1 Running 0 6m16s
local-path-storage local-path-provisioner-9cd9bd544-7629z 0/1 ContainerCreating 0 6m2s
Expected
A KinD cluster is built with the specified version of Antrea and everything is in a healthy position. Actual behavior
Antrea does not become healthy and therefore cannot be fully used. Versions:
Please provide the following information:
- Antrea version (Docker image tag).
v1.6.1
- Kubernetes version (use
kubectl version
). If your Kubernetes components have different versions, please provide the version for all of them.v1.24.0
- Container runtime: which runtime are you using (e.g. containerd, cri-o, docker) and which version are you using?
Docker
- Linux kernel version on the Kubernetes Nodes (
uname -r
).5.10.102.1-microsoft-standard-WSL2
- If you chose to compile the Open vSwitch kernel module manually instead of using the kernel module built into the Linux kernel, which version of the OVS kernel module are you using? Include the output of
modinfo openvswitch
for the Kubernetes Nodes.
Additional context
After reading the documentation further, once I manually pull the projects.registry.vmware.com/antrea/antrea-ubuntu:latest
image and re-run the script, it complete successfully. There either needs to be:
- A provision in the script to detect and pull (if missing) the appropriate image prior to attempting the load or;
- a note in the documentation stating that is a prerequisite to running the
kind-setup.sh
script.
EDIT: I realize, as stated here, running Antrea on WSL2 backend isn't supported, so the point of this issue isn't making it work but fixing the scripted "quick start" approach to running Antrea.
@chipzoller thanks for the details. kind-setup.sh is a convenience script typically used for testing a local build so it was made to not pull the image automatically. But as you suggested we could make it more friendly by detecting whether it's available locally before loading it and throwing error.
BTW, if loading local antrea image to kind nodes failed, the nodes would still work as they could pull the image from public repo. I guess anrea-agent went to Init:CrashLoopBackOff
status because some required kernel modules in the WSL2 backend were missing as the doc https://github.com/antrea-io/antrea/blob/main/docs/kind.md#antrea-agents-are-not-starting-on-windows-what-could-it-be listed? If you could build a custom Kernel for WSL 2 with the listed modules, it should work.
I can work on adding this functionality to the script. Please assign.
thanks @mohitsaxenaknoldus, assigned it to you
I can't pull the image:
knoldus@knoldus-Latitude-3510:~/OS/antrea/ci/kind$ sudo docker pull projects.registry.vmware.com/antrea/antrea-ubuntu:latest
latest: Pulling from antrea/antrea-ubuntu
d5fd17ec1767: Pull complete
67ff7a99b9f4: Downloading
41417343aff5: Download complete
f891394d3432: Download complete
fa8cd1e41c4f: Download complete
e7e9f0ca0573: Download complete
28f0b358a818: Download complete
9cdeaef5e864: Download complete
eec577fe2dad: Download complete
unknown blob
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days