zoukankan      html  css  js  c++  java
  • 【Vegas原创】k8s添加新master或node

    Master

    1,在master上生成新的token

    [root@it-1c2d ~]# kubeadm token create --print-join-command
    kubeadm join k8s.test:6443 --token apzooq.r9zivb2vaakn72k7     --discovery-token-ca-cert-hash sha256:255fc6a65316054aa5f1bfd92467ebce52f557983f5e901663a3a460af2c60b5

    2,在master上生成用于新master加入的证书

    [root@it-1c2d ~]# kubeadm init phase upload-certs --upload-certs
    I0709 14:01:24.232720    5729 version.go:254] remote version is much newer: v1.21.2; falling back to: stable-1.20
    [upload-certs] Storing the certificates in Secret "kubeadm-certs" in the "kube-system" Namespace
    [upload-certs] Using certificate key:
    911682ede59903ec2f7968e64110dfaea58e0c0abbab01e01ab5dc45f17d1d7b


    另外一台要装master的机器:

    1,安装k8s

    https://www.cnblogs.com/amadeuslee/p/14985562.html

    2,copy  master 步骤1的join 命令  ,--certificate-key后加入步骤2 的命令, 红底标记。

    kubeadm join k8s.test:6443 --token apzooq.r9zivb2vaakn72k7     --discovery-token-ca-cert-hash sha256:255fc6a65316054aa5f1bfd92467ebce52f557983f5e901663a3a460af2c60b5 --control-plane --certificate-key 911682ede59903ec2f7968e64110dfaea58e0c0abbab01e01ab5dc45f17d1d7b
    喜欢请赞赏一下啦^_^
  • 相关阅读:
    scrapy爬虫框架
    运用GRASP原则来做uml交互类图-------pos机实例
    csv文件读取
    文件编码解读
    smtp模块使用
    csv模块简单使用
    用Beautifulsoup 来爬取贴吧图片
    批处理命令——set
    bat批处理教程之for的/f参数
    docker 下 alpine 镜像设置时区的有效办法
  • 原文地址:https://www.cnblogs.com/amadeuslee/p/14990714.html
Copyright © 2011-2022 走看看