Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Kubernetes Cluster in kubeadm

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to install Kubernetes cluster in kubeadm, in view of this problem, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

1, modify the hostname

/ / master 192.168.2.211hostnamectl set-hostname kube-master//node1 192.168.2.212hostnamectl set-hostname kube-node1//node1 192.168.2.213hostnamectl set-hostname kube-node2

2. Turn off the firewall

Systemctl stop firewalld & & systemctl disable firewalld

3. Close selinux. It must be modified to allow the container to access the host file system.

/ / temporary setenforce 0ram / permanent sed-I "s/SELINUX=enforcing/SELINUX=disabled/g" / etc/sysconfig/selinux

4. Close swap, otherwise an error will be reported.

/ / temporary swapoff-a swapoff / permanent vi / etc/fstab comment out the line / dev/mapper/cl-swap

As shown in the picture

To modify the configuration that is permanently shut down, you need to restart the system.

5. Install docker

Official documents say that the verified docker versions are 1.11.1,1.12.1, 1.13.1, 17.03,17.06,17.09,18.06 (https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#external-dependencies), but there are many problems with using versions prior to 1.13 in testing, so the current latest version 18 is used here.

Sudo yum install-y yum-utilssudo yum-config-manager-- add-repo https://download.docker.com/linux/centos/docker-ce.reposudo yum install-y docker-cesystemctl start docker & & systemctl enable docker

Version:

[root@kube-master ~] # docker versionClient: Version: 18.09.0 API version: 1.39 Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:48:22 2018 OS/Arch: linux/amd64 Experimental: falseServer: Docker Engine-Community Engine: Version: 18.09.0 API version: 1.39 (minimum version 1.12) Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:19:08 2018 OS/Arch: linux/amd64 Experimental: false

6. Install kubeadm,kubelet,kubectl

Cat

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report