Projects:Kubernetes: verschil tussen versies

Naar navigatie springen Naar zoeken springen
Geen verandering in de grootte ,  10 mrt 2019
k
geen bewerkingssamenvatting
Geen bewerkingssamenvatting
kGeen bewerkingssamenvatting
Regel 103: Regel 103:
* We install the basic Kubernetes tools: <code>kubeadm</code>, <code>kubelet</code> and <code>kubecfg</code>. [https://kubernetes.io/docs/setup/independent/install-kubeadm/ Here's a nice guide for it].
* We install the basic Kubernetes tools: <code>kubeadm</code>, <code>kubelet</code> and <code>kubecfg</code>. [https://kubernetes.io/docs/setup/independent/install-kubeadm/ Here's a nice guide for it].
* We use <code>kubeadm</code> to create our cluster. [https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ Just follow this guide], until the "Installing a pod network add-on" step.
* We use <code>kubeadm</code> to create our cluster. [https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ Just follow this guide], until the "Installing a pod network add-on" step.
* I used: <code>kubeadm init --pod-network-cidr "10.107.0.0/16" --service-cidr "10.16.0.0/16"</code>
** I used: <code>kubeadm init --pod-network-cidr "10.107.0.0/16" --service-cidr "10.16.0.0/16"</code>
* After this, <code>kubectl get nodes</code> should already respond with your master node, and <code>kubectl get pods --all-namespaces</code> should mention the <code>kube-system</code> pods that make up the Control Plane as discussed above!
** After this, <code>kubectl get nodes</code> should already respond with your master node, and <code>kubectl get pods --all-namespaces</code> should mention the <code>kube-system</code> pods that make up the Control Plane as discussed above!
* We install a pod network add-on. As discussed before, we use Weave, but YMMV. See [https://www.weave.works/docs/net/latest/kubernetes/kube-addon/ this guide on Weave setup], with an important note: if you don't use Kubernetes' default Pod network CIDR, pay attention to the exact <code>kubectl apply</code> step.
* We install a pod network add-on. As discussed before, we use Weave, but YMMV. See [https://www.weave.works/docs/net/latest/kubernetes/kube-addon/ this guide on Weave setup], with an important note: if you don't use Kubernetes' default Pod network CIDR, pay attention to the exact <code>kubectl apply</code> step.
* I used: <code>kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.IPALLOC_RANGE=10.107.0.0/16"</code>
** I used: <code>kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.IPALLOC_RANGE=10.107.0.0/16"</code>
* After this, <code>kubectl get pods --all-namespaces</code> should show some additional pods. Most importantly, it should now show that CoreDNS is running.
** After this, <code>kubectl get pods --all-namespaces</code> should show some additional pods. Most importantly, it should now show that CoreDNS is running.
* Now, we can join our other nodes. <code>kubeadm init</code> will show a <code>kubeadm join</code> command at the end of its output, which you can run on the other nodes. If you don't have that output anymore, see [https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-join/#token-based-discovery-with-ca-pinning this page on how to recreate a valid join command].
* Now, we can join our other nodes. <code>kubeadm init</code> will show a <code>kubeadm join</code> command at the end of its output, which you can run on the other nodes. If you don't have that output anymore, see [https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-join/#token-based-discovery-with-ca-pinning this page on how to recreate a valid join command].

Navigatiemenu