将外部节点添加到GCP Kubernetes集群 [英] Add external node to GCP Kubernetes Cluster

查看:71
本文介绍了将外部节点添加到GCP Kubernetes集群的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在GCP上有一个kubernetes集群,该集群是使用GCP仪表板创建的.我在其中创建了3个默认节点.

I have a kubernetes cluster on GCP which I created using the GCP dashboard. I created 3 default nodes in it.

现在,我想将我的笔记本电脑添加为该群集的节点.我发现可以为此使用kubeadm init,但是每当我在gcloud控制台中尝试使用该命令时(使用gcloud container clusters get-credentials standard-cluster-1 --zone us-central1-a --project river-autumn-253318登录后),它说我只有1个CPU.

Now, I want to add my laptop as a node to this cluster. I found that we can use kubeadm init for that but whenever I try that in my gcloud console (after logging in using gcloud container clusters get-credentials standard-cluster-1 --zone us-central1-a --project river-autumn-253318) it says that I have only 1 CPU.

另一个问题是,我在网上看到的教程在运行kubeadm init后总是将群集IP分配为192.x.x.x或172.x.x.x,据我所知,这是私有IP.

Another problem is that the tutorials which I saw online always give out cluster IP as 192.x.x.x or 172.x.x.x after running kubeadm init, which, I understand are private IPs.

如何将笔记本电脑作为节点添加到GCP Kubernetes集群.

How can I add my laptop as a node to the GCP Kubernetes Cluster.

推荐答案

我能够解决此问题.我要做的就是添加标志--control-plane-endpoint.

I was able to solve the problem. All I had to do was add the flag --control-plane-endpoint.

我最后的记号是kubeadm init --pod-network-cidr=10.240.0.0/16 --control-plane-endpoint=35.222.246.129

谢谢大家的投入.

这篇关于将外部节点添加到GCP Kubernetes集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆