In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Although there are distributions such as Rancher OS and CoreOS, the installation of Kubernetes clusters is not too troublesome, so let's start with the most basic experiments. The following is my CentOS7.6 installation of Kubernetes cluster notes, and chapter-by-chapter records, continuous updates.
Kubernetes host environment preset
There are also many choices for the host production environment of the Kubernete cluster, as follows:
Scheme 1: three or five Master nodes, install full roles respectively: ETCD, Control Plane; other nodes are container computer nodes, install roles respectively: worker; scheme 2: three nodes install roles: ETCD; two nodes install roles: Control Plane; other nodes are container computer nodes, install roles: worker
But now I only have a 7-generation i7 notebook. Although it has 16 GB of memory, this dual-core four-thread is really not good enough. Do not consider stand-alone and minikube installation first, and then implement it one by one after the small experimental cluster has finished the experiment. My notebook is an installed fedora, using the kvm virtual machine to virtualize three hosts each with 1vcpu+1G memory, installing one master node and two compute nodes respectively.
The kubernetes components that each node needs to install are as follows:
Master Node: kube-apiserverkube-controller-managerkube-schedulerkube-proxypauseetcdcoredns Slave Node: kube-proxypauseflannel (the network plug-in selected in this experiment) 1.2 sets time synchronization
For example, chrony, configuration file / etc/chrony.conf (time server needs to be configured in private network), and systemctl command is used to start the service. It is recommended to configure a time synchronization server for the cluster regardless of the private network and the environment that can connect to the Internet.
1.3 configure DNS or hosts host resolution
Configure cluster IP and hostname resolution in the / etc/hosts file (while reducing DNS resolution latency)
1.4 turn off the firewall
Turn off the firewall on CentOS7
# systemctl stop firewalld.service# systemctl disable firewalld.service1.5 closes SELinux# setenforce 0
/ etc/selinux/config file when configured at the same time
# vim / etc/selinux/config...SELINUX=disable
Or
# sed-I's @ ^\ (SELINUX=\). * @\ 1disable swap devices / etc/sysconfig/selinux1.6
Kubernetes 1.8 needs to shut down the system Swap swap partition at first, but it cannot be started if it is not turned off.
View
# free-m
Temporarily Closed
# swapoff-a # echo "vm.swappiness = 0" > > / etc/sysctl.conf
Or
# swapoff-a & & sysctl-w vm.swappiness=0
At the same time, edit the configuration file / etc/fstab to permanently close, that is, comment on the line where the swap device is mounted.
Note: this experiment is not closed due to limited resources, but there are subsequent solutions (only in the experimental environment)
1.7 enable IPVS kernel module
Kube-proxy supports iptables and ipvs. If conditions are met, ipvs is used by default, otherwise iptables is used.
Cat / etc/sysconfig/modules/ipvs.modules 192.168.0.1:6443 Masq 1 1 0
If the above prerequisites are not met, even if ipvs mode is enabled for the configuration of kube-proxy, it will be returned to iptables mode.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.