Kubernetes : Configure Manager Node2024/06/07 |
Configure Multi Nodes Kubernetes Cluster. This example is based on the environment like follows.
For System requirements, each Node has unique Hostname, MAC address, Product_uuid. +----------------------+ +----------------------+ | [ ctrl.srv.world ] | | [ dlp.srv.world ] | | Manager Node | | Control Plane | +-----------+----------+ +-----------+----------+ eth0|10.0.0.25 eth0|10.0.0.30 | | ------------+--------------------------+----------- | | eth0|10.0.0.51 eth0|10.0.0.52 +-----------+----------+ +-----------+----------+ | [ node01.srv.world ] | | [ node02.srv.world ] | | Worker Node#1 | | Worker Node#2 | +----------------------+ +----------------------+ |
[1] | Configure Manager Node first. |
root@ctrl:~#
apt -y install nginx libnginx-mod-stream
root@ctrl:~#
vi /etc/nginx/nginx.conf # add to last line : proxy settings stream { upstream k8s-api { server 10.0.0.30:6443; } server { listen 6443; proxy_pass k8s-api; } } # disable default site on Nginx root@ctrl:~# unlink /etc/nginx/sites-enabled/default root@ctrl:~# systemctl restart nginx
|
[2] | On Manager Node, Install Kubernetes client. |
root@ctrl:~#
root@ctrl:~# curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg root@ctrl:~# echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list
apt update root@ctrl:~# apt -y install kubectl
|
Sponsored Link |