zoukankan      html  css  js  c++  java
  • kubeadm 搭建 k8s 时用到的常用命令汇总

    简单记录一下

    kubeadm config images list 
    
    修改镜像名称
    docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.21.0               k8s.gcr.io/kube-apiserver:v1.21.0
    docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.21.0               k8s.gcr.io/kube-proxy:v1.21.0
    docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.21.0               k8s.gcr.io/kube-scheduler:v1.21.0
    docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.21.0               k8s.gcr.io/kube-controller-manager:v1.21.0
    docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/coredns/coredns:v1.8.0                k8s.gcr.io/coredns/coredns:v1.8.0
    docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.4.1                 k8s.gcr.io/pause:3.4.1
    docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.4.13-0              k8s.gcr.io/etcd:3.4.13-0
    
    for i in `docker images |grep -v REP |grep ^k8s  |awk '{print $1}'` ; do j=`docker images |grep $i |awk '{print $2}'`  && docker save $i:$j > ${i##*/}.tar ; done
    
    for i in `ls` ; do docker load < $i ; done
    
    kubeadm config print init-defaults  > kubeadm-config.yaml
    
    kubeadm token create  --print-join-command
    
    kubectl  describe secret -n kubernetes-dashboard |grep admin-user-token -A 14
    
  • 相关阅读:
    [51nod] 1301 集合异或和
    [BZOJ] 1088: [SCOI2005]扫雷Mine
    [LUOGU] P4251 [SCOI2015]小凸玩矩阵
    8.21模拟赛
    [BZOJ] 3163: [Heoi2013]Eden的新背包问题
    [BZOJ] 1001: [BeiJing2006]狼抓兔子
    【NOIP2017提高A组冲刺11.8】好文章
    [BZOJ] 1520: [POI2006]Szk-Schools
    [BZOJ] 1877: [SDOI2009]晨跑
    day23(事务管理)
  • 原文地址:https://www.cnblogs.com/jinanxiaolaohu/p/14831348.html
Copyright © 2011-2022 走看看