-
Notifications
You must be signed in to change notification settings - Fork 712
Sync the containerd files for Kubernetes #718
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,10 +54,46 @@ provision: | |
apt-get install -y cri-tools | ||
cat <<EOF | sudo tee /etc/crictl.yaml | ||
runtime-endpoint: unix:///run/containerd/containerd.sock | ||
image-endpoint: unix:///run/containerd/containerd.sock | ||
EOF | ||
# cni-plugins | ||
apt-get install -y kubernetes-cni | ||
mkdir -p /etc/cni/net.d | ||
cat << EOF | tee /etc/cni/net.d/10-containerd-net.conflist | ||
{ | ||
"cniVersion": "0.4.0", | ||
"name": "containerd-net", | ||
"plugins": [ | ||
{ | ||
"type": "bridge", | ||
"bridge": "cni0", | ||
"isGateway": true, | ||
"ipMasq": true, | ||
"promiscMode": true, | ||
"ipam": { | ||
"type": "host-local", | ||
"ranges": [ | ||
[{ | ||
"subnet": "10.88.0.0/16" | ||
}], | ||
[{ | ||
"subnet": "2001:4860:4860::/64" | ||
}] | ||
], | ||
"routes": [ | ||
{ "dst": "0.0.0.0/0" }, | ||
{ "dst": "::/0" } | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "portmap", | ||
"capabilities": {"portMappings": true} | ||
} | ||
] | ||
} | ||
EOF | ||
# To use flannel, delete the default CNI network | ||
# To use containerd-net, comment this and below | ||
rm -f /etc/cni/net.d/*.conf* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This rm -f is confusing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I inherited from the installation where we also have podman and cri-o Perhaps remove the glob and use the above only ? Hope nothing else is there. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the recent release, the cni conf dir flag has been removed - which broke our workaround There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Anyway, we get a default CNI with the container runtime installation. It must be deleted, if we want to install our own CNI - like "flannel" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should only support flannel. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Main reason for containerd-net was to not depend on any third-party images
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The registry changed from k8s.gcr.io to registry.k8s.io and from quay.io to docker.io, but anyway.
|
||
apt-get install -y kubelet kubeadm kubectl && apt-mark hold kubelet kubeadm kubectl | ||
systemctl enable --now kubelet | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we are going to support multi-node example (#1183), so probably we do not need to use non-flannel bridge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would have to be versioned, at least. That is, only apply when number of nodes == 1. Otherwise flannel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it harmless to use flannel on single-node mode too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, just overkill. Mostly it was triggered by the kubeadm team not wanting to support flannel anymore.