LINUX7-based k8s deployment (i)

Source: Internet
Author: User
Tags etcd k8s

LINUX7-based k8s deployment (i)

    1. Environment preparation
      #系统环境lsb_release -aDistributor ID: CentOSDescription:    CentOS Linux release 7.3.1611 (Core)Release:    7.3.1611Codename:   Core说明:如提示:-bash: lsb_release: command not found,请yum install -y redhat-lsb#查看selinux状态getenforceDisabled#docker 版本docker --versionDocker version 17.09.0-ce, build afdb6d4
    2. Initializing configuration work
      Master and Node nodes because of division of labor, so the installation of different services, the final installation completed, Master and node start the core services are as follows:
Td>kube-scheduler
Master node node node
etcd-master kube-flannel
kube-apiserver kube-proxy
Kube-con Troller-manager Other apps
kube-proxy --------
--------
kube-dns --------
kube-flannel --------
pause-amd64 --------
    1. Base image (binary) (take v1.10.0 as an example):
      #说明:
      Do high availability must ensure that the master node is 2 and above, recommended 3 nodes!
      #下载kubernetes二进制文件
      Can be downloaded from kubernetes, generally need to download the server package, unzip the file, use the Docker load command to load the tar package into a usable image (if necessary to hit the tag you want).
      #下载:kubernetes-server-linux-amd64.tar.gzkubernetes-src.tar.gzkubernetes.tar.gz#解压缩tar zxf kubernetes-server-linux-amd64.tar.gzcd /data/k8s/kubernetes/server/bin#创建镜像docker load -i  kube-apiserver.tardocker load -i kube-controller-manager.tardocker load -i kube-scheduler.tardocker load -i kube-proxy.tar

      The list of individual images that #本次演示 kubernetes depends on is as follows:

Image Name Version Des (* required)
k8s.gcr.io/kube-apiserver v1.10.0 *
K8s.gcr.io/kube-cont Roller-manager v1.10.0 *
k8s.gcr.io/kube-scheduler v1.10.0 *
k8s.gcr.io/kube-proxy v1.10.0 *
k8s.gcr.io/k8s-dns-dnsmasq-nanny-amd64 1.14.8 *
k8s.gcr.io/k8s-dns-sidecar-amd64 1.14.8 *
k8s.gcr.io/k8s-dns-kube-dns-amd64 1.14.8 *
k8s.gcr.io/pause-amd64 3.1 *
quay.io/coreos/flannel v0.9.1 *
quay.io/calico/node v2.6.2
quay.io/calico/cni v1.11.0
k8s.gcr.io/etcd-amd64 3.1.12
    1. Running the Kubelet service
      #cp文件cp /data/k8s/kubernetes/server/bin/kubeadm   /usr/bin/cp /data/k8s/kubernetes/server/bin/kubectl      /usr/bin/cp /data/k8s/kubernetes/server/bin/kubelet      /usr/bin/#cp kubelet.service文件mkdir kubernetes-srctar zxf kubernetes-src.tar.gz -C ./kubernetes-src/cd /data/k8s/kubernetes-src/build/rpmscp ./kubelet.service  /etc/systemd/system/chmod 755  /etc/systemd/system/kubelet.service#修改kubelet.service文件[Unit]Description=kubelet: The Kubernetes Node AgentDocumentation=http://kubernetes.io/docs/[Service]ExecStart=/usr/bin/kubeletRestart=alwaysStartLimitInterval=0RestartSec=10[Install]WantedBy=multi-user.target#开启kubelet服务systemctl start  kubelet.servicesystemctl status kubelet.service

LINUX7-based k8s deployment (i)

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.