In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
CentOS-7 install Kubernetes-1.12.1
Label: CentOS-7- installation Kubernetes-1.12.1
Environment description:
System: CentOS-7 4.19.0-1.el7.elrepo.x86_64
Kubernetes:Kubernetes-1.12.1
Construct one master and one node
Prerequisites (to be executed on each server): 1. Enable iptables forwarding
Xian uses the command cat / proc/sys/net/bridge/bridge-nf-call-iptables to check whether the value is 1. If it is 1, the following steps do not need to be performed, otherwise, continue with the following steps to enable the relevant functions.
1.1 modify the file
Sed-I 7recover9sCompact 0Accord1Accord g / usr/lib/sysctl.d/00-system.conf
1.2 load netfilter module (you can use the lsmod | grep netfilter command to see if the module is loaded)
Modprobe br_netfilter
2.1.3 make the changes effective
Sysctl-p / usr/lib/sysctl.d/00-system.conf2. Turn off Swap swap space
2.1 modify the file
Echo 'vm.swappiness = 0' > > / usr/lib/sysctl.d/00-system.conf
2.2 make the changes effective
Sysctl-p / usr/lib/sysctl.d/00-system.conf
2.3 turn off swap
Swapoff-a
2.4 comment out the mount code for swap in the "/ etc/fstab" file (turn off boot auto mount)
Before change: / dev/mapper/cl-swap defaults 0 0 after change: # / dev/mapper/cl-swap defaults 0 03. Add hosts to ensure that the hostname resolution is normal echo-e '192.168.2.168 node1.ztpt.com\ n192.168.2.162 node2.ztpt.com\ n192.168.2.170 node3.ztpt.com' > > / etc/hosts4. Shut down iptables, selinux and firewalld services [root@node1] # getenforce Disabled [root@node1] # systemctl status firewalld ● firewalld.service-firewalld-dynamic firewall daemon Loaded: loaded (/ usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld (1) [root@node1 ~] # systemctl status iptables ● iptables.service-IPv4 firewall with iptables Loaded: loaded (/ usr/lib/systemd/system/iptables.service; disabled) Vendor preset: disabled) Active: inactive (dead) 5. All three servers need to install docker, kubelet, kubectl and kubeladm to install Docker-CE (see https://blog.51cto.com/wangxiaoke/2174103)
Add docker warehouse wget-O / etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
Installation dependency
Sudo yum install-y yum-utils device-mapper-persistent-data lvm2
Install docker-ce
Yum install-y docker-ce
Set the docker service to boot
Systemctl enable docker.service
Set docker-registry-mirrors address (Aliyun provides free mirroring service)
Sudo tee / etc/docker/daemon.json
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.