From 6cbcc4ae697a071e6c4767c7f0d0b3ab0a848e33 Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Tue, 29 Oct 2019 19:44:41 -0500 Subject: [PATCH 1/2] Fix CNI version (0.8 is unsupported yet) --- prepare-vms/lib/commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prepare-vms/lib/commands.sh b/prepare-vms/lib/commands.sh index 99d8452f..ade36b6e 100644 --- a/prepare-vms/lib/commands.sh +++ b/prepare-vms/lib/commands.sh @@ -143,7 +143,7 @@ _cmd_kubebins() { sudo mkdir -p /opt/cni/bin cd /opt/cni/bin if ! [ -x bridge ]; then - curl -L https://github.com/containernetworking/plugins/releases/download/v0.8.2/cni-plugins-amd64-v0.8.2.tgz \ + curl -L https://github.com/containernetworking/plugins/releases/download/v0.7.6/cni-plugins-amd64-v0.7.6.tgz \ | sudo tar -zx fi " From 23aaf7f58ceed72b3d04359835050c85cd4a600f Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Tue, 29 Oct 2019 19:48:23 -0500 Subject: [PATCH 2/2] Improve DMUC slides --- slides/k8s/dmuc.md | 26 +++++++------------------- slides/k8s/multinode.md | 20 ++++++++++++-------- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/slides/k8s/dmuc.md b/slides/k8s/dmuc.md index 17f60543..94658c6b 100644 --- a/slides/k8s/dmuc.md +++ b/slides/k8s/dmuc.md @@ -481,13 +481,13 @@ docker run alpine echo hello world .exercise[ -- Create the file `kubeconfig.kubelet` with `kubectl`: +- Create the file `~/.kube/config` with `kubectl`: ```bash - kubectl --kubeconfig kubeconfig.kubelet config \ + kubectl config \ set-cluster localhost --server http://localhost:8080 - kubectl --kubeconfig kubeconfig.kubelet config \ + kubectl config \ set-context localhost --cluster localhost - kubectl --kubeconfig kubeconfig.kubelet config \ + kubectl config \ use-context localhost ``` @@ -495,19 +495,7 @@ docker run alpine echo hello world --- -## All Kubernetes clients can use `kubeconfig` - -- The `kubeconfig.kubelet` file has the same format as e.g. `~/.kubeconfig` - -- All Kubernetes clients can use a similar file - -- The `kubectl config` commands can be used to manipulate these files - -- This highlights that kubelet is a "normal" client of the API server - ---- - -## Our `kubeconfig.kubelet` file +## Our `~/.kube/config` file The file that we generated looks like the one below. @@ -533,9 +521,9 @@ clusters: .exercise[ -- Start kubelet with that `kubeconfig.kubelet` file: +- Start kubelet with that kubeconfig file: ```bash - kubelet --kubeconfig kubeconfig.kubelet + kubelet --kubeconfig ~/.kube/config ``` ] diff --git a/slides/k8s/multinode.md b/slides/k8s/multinode.md index af6b6194..ac224b20 100644 --- a/slides/k8s/multinode.md +++ b/slides/k8s/multinode.md @@ -218,6 +218,18 @@ class: extra-details ## What's going on? +- Without the `--network-plugin` flag, kubelet defaults to "no-op" networking + +- It lets the container engine use a default network + + (in that case, we end up with the default Docker bridge) + +- Our pods are running on independent, disconnected, host-local networks + +--- + +## What do we need to do? + - On a normal cluster, kubelet is configured to set up pod networking with CNI plugins - This requires: @@ -228,14 +240,6 @@ class: extra-details - running kubelet with `--network-plugin=cni` -- Without the `--network-plugin` flag, kubelet defaults to "no-op" networking - -- It lets the container engine use a default network - - (in that case, we end up with the default Docker bridge) - -- Our pods are running on independent, disconnected, host-local networks - --- ## Using network plugins