Jump to content

Kubernetes: Difference between revisions

677 bytes added ,  8 February 2022
Line 15: Line 15:


====kubeadm====
====kubeadm====
kubeadm install
Deploy a Kubernetes cluster using kubeadm
{{hidden | Install Commands |
{{hidden | Install Commands |
<pre>
<pre>
Line 92: Line 92:
   --pod-network-cidr=10.0.0.0/16
   --pod-network-cidr=10.0.0.0/16
    
    
# (Optional) Remove taint on control-node to allow job scheduling
kubectl taint nodes --all node-role.kubernetes.io/master-
</pre>
}}
{{hidden | Setup Networking With Calico |
After creating you control plane, you need to deploy a network plugin.<br>
Popular choices are Calico and Flannel.<br>
See [https://projectcalico.docs.tigera.io/getting-started/kubernetes/quickstart Quickstart]
<pre>
# Setup calico networking
# Setup calico networking
kubectl create -f https://projectcalico.docs.tigera.io/manifests/tigera-operator.yaml
kubectl create -f https://projectcalico.docs.tigera.io/manifests/tigera-operator.yaml
Line 118: Line 128:
spec: {}
spec: {}
EOF
EOF
# (Optional) Remove taint on control-node to allow job scheduling
kubectl taint nodes --all node-role.kubernetes.io/master-
</pre>
</pre>
}}
{{hidden | Add worker nodes |
{{hidden | Add worker nodes |
Run the following on worker nodes.
Run the following on worker nodes.
Line 132: Line 138:
</pre>
</pre>
}}
}}
 
{{hidden | Ingress Controller (ingress-nginx) |
The ingress controller is used to forward HTTP requests to the appropriate ingress.<br>
See https://kubernetes.github.io/ingress-nginx/.
}}
{{hidden | Local Balancer (MetalLB) (Optional) |
See https://metallb.universe.tf/installation/.<br>
I do not have this set up on mine but if you want proper load balancing, you should set it up.
}}
;Notes
;Notes
* [https://stackoverflow.com/questions/57504063/calico-kubernetes-pods-cant-ping-each-other-use-cluster-ip https://stackoverflow.com/questions/57504063/calico-kubernetes-pods-cant-ping-each-other-use-cluster-ip]
* [https://stackoverflow.com/questions/57504063/calico-kubernetes-pods-cant-ping-each-other-use-cluster-ip https://stackoverflow.com/questions/57504063/calico-kubernetes-pods-cant-ping-each-other-use-cluster-ip]