Kubernetes/部署文档/Kubeadm/Kubeadm初始化安装Kubernetes节点.md
offends 7a2f41e7d6
All checks were successful
continuous-integration/drone Build is passing
synchronization
2024-08-07 18:54:39 +08:00

1016 B

本文作者:丁辉

Kubeadm初始化安装Kubernetes节点

  1. Kubernetes安装

    kubeadm init \
    --image-repository=registry.aliyuncs.com/google_containers \
    --apiserver-advertise-address=192.168.1.10 \
    --pod-network-cidr=10.244.0.0/16 \
    --service-cidr=10.96.0.0/12
    
  2. 根据提示配置文件

    mkdir -p $HOME/.kube
    sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    sudo chown $(id -u):$(id -g) $HOME/.kube/config
    export KUBECONFIG=/etc/kubernetes/admin.conf
    

    永久生效

    echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >>  ~/.bash_profile
    source ~/.bash_profile
    
  3. 安装网络插件

    请跳转此文档