Kubernetes ADM Installation Tutorial (network using calico)

Source: Internet
Author: User
Tags gpg etcd

1. Disable Iptables


Each machine disables iptables to avoid iptables conflicts with Docker:

Systemctl Stop Firewalld

Systemctl Disable FIREWALLD

Disable SELinux:

Vim/etc/selinux/config

#SELINUX =enforcing

Selinux=disabled


2. Install Docker (master node) from overseas sources

Cat >/etc/yum.repos.d/docker.repo <<-eof

[Dockerrepo]

Name=docker Repository

baseurl=https://yum.dockerproject.org/repo/experimental/centos/7/

Enabled=1

Gpgcheck=1

Gpgkey=https://yum.dockerproject.org/gpg

Eof

Yum-y Install Docker-engine

Systemctl Enable Docker && Systemctl start Docker


3. Install k8s (master node) foreign source

Cat <<eof >/etc/yum.repos.d/kubernetes.repo

[Kubernetes]

Name=kubernetes

Baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64

Enabled=1

Gpgcheck=1

Repo_gpgcheck=1

Gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg

Https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

Eof


Yum install-y kubelet kubeadm kubectl kubernetes-cni && systemctl enable Kubelet && systemctl start K Ubelet


4. Initialize Master

Kubeadm Init--token=b1f4c5.94d2933fea71f20b

Modify the configuration file/etc/kubernetes/manifests/

Etcd.json

--listen-client-urls=http://0.0.0.0:2379

--advertise-client-urls=http://172.22.0.4:2379 (native IP)

Kube-apiserver.json

--insecure-bind-address=0.0.0.0

5. Add node

Kubeadm Join--token b1f4c5.94d2933fea71f20b 172.22.0.4 (master IP)

Modifying a configuration file

/etc/systemd/system/kubelet.service.d/10-kubeadm.conf

At the back of Execstart=/usr/bin/kubelet this adds

--hostname-override=172.22.0.6 (node's own IP)

Systemctl daemon-reload && systemctl Restart Kubelet

6. Install calico (at master)

Download Http://docs.projectcalico.org/v1.5/getting-started/kubernetes/installation/hosted/kubeadm/calico.yaml

Modify Etcd_endpoints: "http://172.22.0.4:2379" (Master IP)

Delete about ETCD Daemonset Service Content


Kubectl create-f Calico.yaml


Testing is used by Ali to go abroad to the server, if the use of domestic has a mirror is pull down.

This article is from the "liangjingpingblog.com" blog, make sure to keep this source http://liangjp.blog.51cto.com/265644/1865864

Kubernetes ADM Installation Tutorial (network using calico)

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.