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节点执行
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值