2022-06-21
Installation Kubernetes
- objectif
- sans minikube
- installer un cp avec
- action
- tuto
- Déploiement d'un cluster avec kubeadm
- Installer kubeadm
- Installation de kubeadm, des kubelets et de kubectl
- Configurer le driver de cgroup utilisé par la kubelet sur un nœud master
- Création d'un Cluster a master unique avec kubeadm
- Initialiser votre master
- Installation d'un add-on réseau
- un seul réseau de pod par cluster (podnetwork)? Which one?
- Calico
- Canal
- Cilium
Flannel
- Kube-router
- Romana
- Weave Net
- JuniperContrail/TungstenFabric
- Isolation des nœuds du control plane
kubectl taint nodes --all node-role.kubernetes.io/master-
- problem
sudo yum install -y kubelet kubeadm kubectl
- error
[Errno -1] repomd.xml signature could not be verified for kubernetes. Trying other mirror.
- fix
kubeadm init
- error
rpc error: code = Unimplemented desc
- fix
kubeadm init
- error
/proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
- fix
- Can't install Kubernetes on Vagrant
- edit
/etc/sysctl.conf to modify locked /proc/sys/net/bridge/bridge-nf-call-iptables
- write
net.bridge.bridge-nf-call-iptables = 1
- exec
sudo sysctl -p
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Alternatively, if you are the root user, you can run:
export KUBECONFIG=/etc/kubernetes/admin.conf
You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
https://kubernetes.io/docs/concepts/cluster-administration/addons/
Then you can join any number of worker nodes by running the following on each as root:
kubeadm join 10.107.3.50:6443 --token o0cury.jf8wylff8bxfn428 \
--discovery-token-ca-cert-hash sha256:ded4cf3b94c672318f5a50fbdf3d3891ef2109ccb3fa1e3dd2cd31a94afae298
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Alternatively, if you are the root user, you can run:
export KUBECONFIG=/etc/kubernetes/admin.conf
You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
https://kubernetes.io/docs/concepts/cluster-administration/addons/
Then you can join any number of worker nodes by running the following on each as root:
kubeadm join 10.107.3.50:6443 --token 9i61xk.7krqncogtc5n8v9m \
--discovery-token-ca-cert-hash sha256:91843c436932f0133dc6d23f18e242832652effe275b48e33b44854412f0fa3f