Jump to content

Kubernetes: Difference between revisions

Line 96: Line 96:
Popular choices are Calico and Flannel.<br>
Popular choices are Calico and Flannel.<br>
See [https://projectcalico.docs.tigera.io/getting-started/kubernetes/quickstart Quickstart]
See [https://projectcalico.docs.tigera.io/getting-started/kubernetes/quickstart Quickstart]
<pre>
<syntaxhighlight lang="bash">


# Setup calico networking
# Setup calico networking
Line 124: Line 124:
spec: {}
spec: {}
EOF
EOF
</pre>
</syntaxhighlight>
}}
 
{{hidden | Add worker nodes |
;Notes
Run the following on worker nodes.
* [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]
<pre>
# Disable swap
sudo swapoff -a && sudo sed -i '/swap/s/^/#/' /etc/fstab
# Add the line to join the cluster here
# kubeadm join <ip>:6443 --token <...> --discovery-token-ca-cert-hash <...>
</pre>
}}
}}
{{hidden | Ingress Controller (ingress-nginx) |
{{hidden | Ingress Controller (ingress-nginx) |
Line 139: Line 133:
See https://kubernetes.github.io/ingress-nginx/.
See https://kubernetes.github.io/ingress-nginx/.
}}
}}
{{hidden | Local Balancer (MetalLB) (Optional) |
{{hidden | Local Balancer (MetalLB) |
See https://metallb.universe.tf/installation/.<br>
See https://metallb.universe.tf/installation/.<br>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 155: Line 149:
</syntaxhighlight>
</syntaxhighlight>
}}
}}
;Notes
{{hidden | Add worker nodes |
* [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]
Run the following on worker nodes.
<pre>
# Disable swap
sudo swapoff -a && sudo sed -i '/swap/s/^/#/' /etc/fstab
# Add the line to join the cluster here
# kubeadm join <ip>:6443 --token <...> --discovery-token-ca-cert-hash <...>
</pre>
}}


===Pods per node===
===Pods per node===