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

Binary installation of Kubernetes (1) description of Building Environment and preparation

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

Share

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

Environment description

System:

Centos 7.5

Cluster:

Master1 192.168.214.88

Master2 192.168.214.89

Master3 192.168.214.90

Etcd1 192.168.214.200

Etcd2 192.168.214.201

Etcd3 192.168.214.202

Node1 192.168.214.203

Node2 192.168.214.204

Node3 192.168.214.205

Each node component

Master: binary installation kube-apiserver,kube-scheduler,kube-config-manager (three important components on master), kubectl (command line tool)

Note: the functions of kube-scheduler, kube-controller-manager and kube-apiserver are closely related; at the same time, only one kube-scheduler and kube-controller-manager process is working. If you run more than one, you need to elect a leader.

Etcd: source binary installation, elect leader

Node: installing flannel,kubelet,kube-proxy,docker-ce

Haproxy: configuring the tcp proxy haroxy component

Software version information

Kubernetes:1.12.2

Etcd:3.2.22

Docker-ce:18.06

Flannel:0.9.1

Haproxy:1.5.18

Preparatory work

All nodes turn off the firewall

Systemctl stop firewalld & & systemctl disable firewalld

All nodes turn off selinux

Sed-I "s/SELINUX=.*/SELINUX=disabled/g" / etc/selinux/config & & setenforce 0

Configure yum source to facilitate installation of kubernetes components

Yum install-y epel-releasevim / etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetesbaseurl= http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64enabled=1gpgcheck=0repo_gpgcheck=0gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg http://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg

Host orientation to communicate with cluster hostname

Vim / etc/hostsmaster1 192.168.214.88 master1master2 192.168.214.89 master2etcd1 192.168.214.200 etcd1etcd2 192.168.214.201 etcd2etcd3 192.168.214.202 etcd3node1 192.168.214.203 node1node2 192.168.214.204 node2

Master1 generates secret key and sets secret-free login to other nodes in the cluster.

Ssh-keygen ssh-copy-id-I / root/.ssh/id_rsa.pub master2ssh-copy-id-I / root/.ssh/id_rsa.pub master3ssh-copy-id-I / root/.ssh/id_rsa.pub etcd1ssh-copy-id-I / root/.ssh/id_rsa.pub etcd2ssh-copy-id-I / root/.ssh/id_rsa.pub etcd3ssh-copy-id-I / root/.ssh/id _ rsa.pub node1ssh-copy-id-I / root/.ssh/id_rsa.pub node2ssh-copy-id-I / root/.ssh/id_rsa.pub node3ssh-copy-id-I / root/.ssh/id_rsa.pub mastercluster

Configure ntpdate time server

Yum install ntpdate-ysystemctl enable ntpdate.servicesystemctl start ntpdate.service temporary synchronization: ntpdate time7.aliyun.com sets the task schedule crontab-usr/sbin/ntpdate time7.aliyun.com > / dev/null 2 > & 1

Close swap, otherwise it will cause kubelet to fail to start

# # temporary shutdown: swapoff-aplink # permanent shutdown: sed-I's Unip. Swing swap.disabled swap.temporary shutdown: permanent shutdown: sed-I's Universe.

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