Kubernetes one of the cluster deployments system environment initialization

Source: Internet
Author: User
Tags etcd k8s aliyun

Installation version:

CentOS   version:        7.4docker   version:        18.03.1-cekubectl  version:        v1.10.1etcdctl  Version:        3.2.18Flannel  version:       v0.10.0

Basic architecture:

IP Address Host Name Service
10.200.3.105 K8s-master Etcd/docker/kube-apiserver/kube-controller-manager/kube-scheduler/flannel
10.200.3.106 K8s-node-1 Etcd/docker/kube-proxy/kubelet/flannel
10.200.3.107 K8s-node-2 Etcd/docker/kube-proxy/kubelet/flannel

1. Turn off SELinux and firewalls

#systemctl Disable Firewalld.service#systemctl Stop Firewalld.service

2. Set the host name:

# hostnamectl--static set-hostname k8s-master# hostnamectl--static set-hostname k8s-node-1# hostnamectl--static set-ho Stname k8s-node-2

3. Set/etc/hosts to ensure that the hostname resolves

10.200. 3.105    k8s-Master10.200. 3.106    k8s-node-110.200. 3.107    k8s-node-2

4. Set up SSH password-free login to all other nodes of the deployment node

[Email protected] ~]# Ssh-keygen-t RSA    [[email protected]-master ~]# ssh-copy-id k8s-master[[ Email protected]-master ~]# ssh-copy-id k8s-node-1[[email protected]-master ~]# Ssh-copy-id k8s-node-2

5. Installing Docker

Step one: Use a domestic docker source

[Email protected] ~]# cd/etc/yum.repos.d/[[Email protected]-Master yum.repos.d]# wget> https://Mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo--2018- to- -  -: -: ---HTTPS://Mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoResolving mirrors.aliyun.com (mirrors.aliyun.com) ...103.15.99.96,103.15.99.93,103.15.99.94, ... Connecting to Mirrors.aliyun.com (mirrors.aliyun.com)|103.15.99.96|:443... connected. HTTP request sent, awaiting response ... $oklength:2640(2.6K) [application/octet-Stream] Saving to: ' Docker-Ce.repo ' -%[===========================================================================================>]2,640--.-k/sinch0s2018- to- -  -: -: the(63.8MB/s)-' Docker-ce.repo ' saved [2640/2640]

Step Two: Docker installation:

[email protected] yum.repos.d]# Yum install-y docker-ce

Step three: Start the background process:

[[email protected] ~]# Systemctl start Docker

6. Prepare the Deployment directory

#mkdir-P/opt/kubernetes/{cfg,bin,ssl,log}

  

Kubernetes one of the cluster deployments system environment initialization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.