From d329f9a12b9b2d00c8136bc5b375b1cef4b561b1 Mon Sep 17 00:00:00 2001 From: Maciej Kwiek Date: Wed, 19 Sep 2018 18:04:58 +0200 Subject: [PATCH] Cilium CNI docs for kubeadm quickstart guide (#9889) Signed-off-by: Maciej Kwiek --- .../independent/create-cluster-kubeadm.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/content/en/docs/setup/independent/create-cluster-kubeadm.md b/content/en/docs/setup/independent/create-cluster-kubeadm.md index bf64e8c688..766ccedb73 100644 --- a/content/en/docs/setup/independent/create-cluster-kubeadm.md +++ b/content/en/docs/setup/independent/create-cluster-kubeadm.md @@ -278,6 +278,35 @@ kubectl apply -f https://docs.projectcalico.org/v3.1/getting-started/kubernetes/ kubectl apply -f https://docs.projectcalico.org/v3.1/getting-started/kubernetes/installation/hosted/canal/canal.yaml ``` +{{% /tab %}} + +{{% tab name="Cilium" %}} +For more information about using Cilium with Kubernetes, see [Quickstart for Cilium on Kubernetes](http://docs.cilium.io/en/v1.2/kubernetes/quickinstall/) and [Kubernetes Install guide for Cilium](http://docs.cilium.io/en/v1.2/kubernetes/install/). + +Passing `--pod-network-cidr` option to `kubeadm init` is not required, but highly recommended. + +These commands will deploy Cilium with its own etcd managed by etcd operator. + +```shell +# Download required manifests from Cilium repository +wget https://github.com/cilium/cilium/archive/v1.2.0.zip +unzip v1.2.0.zip +cd cilium-1.2.0/examples/kubernetes/addons/etcd-operator + +# Generate and deploy etcd certificates +export CLUSTER_DOMAIN=$(kubectl get ConfigMap --namespace kube-system coredns -o yaml | awk '/kubernetes/ {print $2}') +tls/certs/gen-cert.sh $CLUSTER_DOMAIN +tls/deploy-certs.sh + +# Label kube-dns with fixed identity label +kubectl label -n kube-system pod $(kubectl -n kube-system get pods -l k8s-app=kube-dns -o jsonpath='{range .items[]}{.metadata.name}{" "}{end}') io.cilium.fixed-identity=kube-dns + +kubectl create -f ./ + +# Wait several minutes for Cilium, coredns and etcd pods to converge to a working state +``` + + {{% /tab %}} {{% tab name="Flannel" %}}