简体   繁体   English

在kuberneted中找到用于服务IP分配的集群CIDR

[英]Find the cluster CIDR for service IP allocations in kuberneted

How can I find what IP block is used by the api-service (or whatever other component is responsible) to dole out the service IPs, from a live cluster. 我如何找到api服务(或负责任何其他组件)使用哪个IP块从活动群集中分发服务IP。

We use a self managed Kubernetes cluster deployed on AWS using terraform. 我们使用通过Terraform在AWS上部署的自我管理Kubernetes集群。 The networking is managed by Calico. 网络由Calico管理。 However from what I have read it seems like calico is only responsible for the pod and container IPs. 但是,从我阅读的内容来看,似乎calico仅负责容器和容器的IP。

您可以在命令下方运行,然后在输出中找到群集IP范围,例如--service-cluster-ip-range=xxxx/x

kubectl cluster-info dump  | grep --color service-cluster-ip-range

这是在初始运行时传递给您的kube-apiserver的变量,例如:

--service-cluster-ip-range=10.3.0.0/20

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM