k8s安装

docker pull mirrorgooglecontainers/kube-scheduler:v1.13.3

安装docker

  1. 使用阿里的源https://mirrors.aliyun.com/docker-ce/linux/centos/
  2. Cd /etc/yum.repos.d/
  3. Wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

安装kubernetes程序包

  1. 装备源https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
  2. Cd /etc/yum.repos.d/
  3. Vim k8s.repo

[kubernetes]

Name=k8s repo

Baseurl= https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/

Gpgcheck=1

Gpgkey= https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg

https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg

  1. Yum repolist
  2. Yum list all | grep “^kube”
  3. Yum install kubeadm kubelet kubectl
  4. Rpm –ql kubelet

初始化集群

  1. Vi /etc/sysconfig/kubelet    (kubelet_extra_args=“—fail-swap-on=false”)
  2. 查看默认配置:kubeadm config print-default
  3. yum.repos.d]# kubeadm init --kubernetes-version=v1.12.2 --pod-network-cidr=10.244.0.0/16 (--dry-run 测试)
  4. kubeadm config images pull (提前下载镜像)
  5. kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
  6. kubectl get pods -n kube-system
  7. kubectl get nodes
上一篇:QSS的作用需要正确设置文件编码才能起作用


下一篇:iOS沙盒文件目录介绍