kubernetes安装记录

  1. 按文档安装 kubeadm,kubelet,kubectl,kubernetes-cni,docker-ce
    ps: https://niuhp.github.io/k8s/kubeadm.html

  2. 处理环境

swapoff -a
vi /etc/fstab
cat << EOF > /etc/docker/daemon.json
{
  "exec-opts": ["native.cgroupdriver=systemd"]
}
EOF
cat > /etc/systemd/system/kubelet.service.d/20-pod-infra-image.conf <<EOF
[Service]
Environment="KUBELET_EXTRA_ARGS=--pod-infra-container-image=mirrorgooglecontainers/pause-amd64:3.1 --runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice"
EOF
systemctl daemon-reload
apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
etcd:
  image: mirrorgooglecontainers/etcd-amd64:3.1.10
networking:
  podSubnet: 10.96.0.10/16
kubernetesVersion: v1.9.2
imageRepository: mirrorgooglecontainers

其他问题:
centos7添加bridge-nf-call-ip6tables出现No such file or directory: http://www.cnblogs.com/zejin2008/p/7102485.html

  1. 按文档使用 kubeadm 初始化环境
    镜像: https://hub.docker.com/u/mirrorgooglecontainers

  2. 安装kube-router
    https://github.com/cloudnativelabs/kube-router/blob/master/Documentation/kubeadm.md

  3. 添加从节点
    kubeadm token create
    kubeadm join

posted @ 2018-04-02 09:47  snadn  阅读(169)  评论(0编辑  收藏  举报