-
Kubernetes Submit Queue authored
Automatic merge from submit-queue (batch tested with PRs 54488, 54838, 54964). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add support to for alternative container runtime in `kube-up.sh` For https://github.com/kubernetes/features/issues/286. This PR added 4 new environment variables in `kube-up.sh` to support alternative container runtime: 1) `KUBE_MASTER_EXTRA_METADATA` and `KUBE_NODE_EXTRA_METADATA`. Add extra metadata on master and node instance. With this we could specify different cloud-init for a different container runtime, and also add extra metadata for the new cloud-init, e.g. [master.yaml](https://github.com/Random-Liu/cri-containerd/blob/7d739662141cc137f8b1e82a9824b18be2e5df21/test/e2e/master.yaml) 2) `KUBE_CONTAINER_RUNTIME_ENDPOINT`. Specify different sock for different container runtime. It's only used when it's not empty. 3) `KUBE_LOAD_IMAGE_COMMAND`. Specify different load image command for different container runtime. An example for cri-containerd: ``` export KUBE_MASTER_EXTRA_METADATA="user-data=${GOPATH}/src/github.com/kubernetes-incubator/cri-containerd/test/e2e/master.yaml,cri-containerd-configure-sh=${GOPATH}/src/github.com/kubernetes-incubator/cri-containerd/test/configure.sh" export KUBE_NODE_EXTRA_METADATA="user-data=${GOPATH}/src/github.com/kubernetes-incubator/cri-containerd/test/e2e/node.yaml,cri-containerd-configure-sh=${GOPATH}/src/github.com/kubernetes-incubator/cri-containerd/test/configure.sh" export KUBE_CONTAINER_RUNTIME="remote" export KUBE_CONTAINER_RUNTIME_ENDPOINT="/var/run/cri-containerd.sock" export KUBE_LOAD_IMAGE_COMMAND="/home/cri-containerd/usr/local/bin/cri-containerd load" export NETWORK_POLICY_PROVIDER="calico" ``` Signed-off-by:
Lantao Liu <lantaol@google.com> ```release-note none ``` /cc @yujuhong @dchen1107 @feiskyer @mikebrow @abhi @mrunalp @runcom /cc @kubernetes/sig-node-pr-reviews