zoukankan      html  css  js  c++  java
  • kubernetes-使用kubeadm添加node节点

    node节点服务器需要安装好 kubeadm, kubelet 和 kubectl:

    使用kubeadm join 命令即行,使用master节点kebeadm init时的提示:

    root@boke-node:~# kubeadm join 192.168.17.180:6443 --token abcdef.0123456789abcdef 
    >     --discovery-token-ca-cert-hash sha256:ea37964dc96f76f3e658b27ffdc220f60ced82de387aafd8effafe9618f5e6cb
    [preflight] Running pre-flight checks
    	[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
    [preflight] Reading configuration from the cluster...
    [preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
    [kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.16" ConfigMap in the kube-system namespace
    [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
    [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
    [kubelet-start] Activating the kubelet service
    [kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
    
    This node has joined the cluster:
    * Certificate signing request was sent to apiserver and a response was received.
    * The Kubelet was informed of the new secure connection details.
    
    Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
    

     master节点使用kubectl get nodes命令查看是否添加成功 

    kubectl get nodes
    # 打印出node节点便代表成功了 NAME是根据主机名来定义的
    NAME          STATUS   ROLES    AGE    VERSION
    boke-master   Ready    master   104m   v1.16.2
    boke-node     Ready    <none>   103s   v1.16.2
    

      

  • 相关阅读:
    P1127
    CF274D
    BZOJ1477: 青蛙的约会
    BZOJ2770: YY的Treap
    2017-10-湖南套题2
    BZOJ——2697: 特技飞行
    洛谷——P1621 集合
    2017-10-湖南套题1
    项目包结构初始化
    Maven的pom文件配置
  • 原文地址:https://www.cnblogs.com/zsifan/p/11800945.html
Copyright © 2011-2022 走看看