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 a Kubernets cluster?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

How to install a Kubernets cluster? In view of this problem, today the editor summarizes this article on installing Kubernets clusters, hoping to help more students who want to solve this problem to find a more simple and easy way.

System initialization

The first are three centos servers. Then start to install the components, here in order to facilitate the software installed on the three machines, the images pulled are all the same, in fact, you can install a little less, but anyway, you can not save much space, because these software and images are not very large.

First, actions such as turning off the firewall and selinux ensure that these settings do not affect the operation.

Sed-I "s/SELINUX=enforcing/SELINUX=disabled/g" / etc/selinux/configsystemctl stop firewalldsystemctl disable firewalldswapoff-asetenforce 0

And remember to comment out the line with the swap character in / etc/fstab, otherwise the kubelet service will make an error after restarting. Reference command

Sed-I'sUnip. Swap.pickswap.Candle / etc/fstab

Install docker

The next step is to start the work of downloading software and pulling mirrors. The problem with them at the same time is that the official source cannot be downloaded (because it is the server of a well-known foreign search engine). So we need to add a mirror source.

Yum install-y yum-utils device-mapper-persistent-data lvm2yum-config-manager-- add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoyum list docker-ce-- showduplicates | sort-ryum-y install docker-cesystemctl start dockersystemctl status dockersystemctl enable docker

Install kubernets

Install kubelet, kubeadm and kubectl, and pay attention to the version. The version downloaded from the yum source is the latest by default, so the container image must be at least newer than this version. If not, please indicate the version information when downloading. When I was doing this test environment, all the software and images were version 1.16.0.

Add the mirror source of Aliyun.

Cat > > / etc/yum.repos.d/kubrenetes.repo

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