k8s入坑之报错(8)kubeadm init 格式报错

$ kubeadm init 
  --apiserver-advertise-address=192.168.1.112               ( 当前节点的ip,即自己muster的ip)
  --image-repository registry.aliyuncs.com/google_containers ( k8s的镜像,用阿里的,因为官方的在国外,可能无法访问)
  --kubernetes-version v1.18.0                               ( 指定当前版本)
  --service-cidr=10.96.0.0/12                                ( 随便写,和当前的ip不冲突即可)
  --pod-network-cidr=10.244.0.0/16                           ( 这六行时一条命令,在一条命令中执行)

执行报错:

报错找不到了

修改名格式重新执行:

kubeadm init    --apiserver-advertise-address=192.168.1.112  --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.18.0    --service-cidr=10.96.0.0/12   --pod-network-cidr=10.244.0.0/16

正确输出:

[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

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

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 192.168.1.112:6443 --token pr5ftv.ihrv3t2p32n1s2p8 \
    --discovery-token-ca-cert-hash sha256:5ea87ae5440baa0412acca4fa7d0c650677b37519f57765eed13b9df88c3b2be    ## node节点执行
posted @   muzlei  阅读(288)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· 百万级群聊的设计实践
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性
点击右上角即可分享
微信分享提示