我有两个问题:
背景:
Calico的默认Pod Network CIDR为192.160.0.0/16,并且doco声明其不得与物理网络重叠。我可以在calico.yaml中更改该设置,但是documentation也指出要配置etc_endpoints。
Q1。为什么我需要配置etcd_endpoint?
Q2。我在哪里找到价值?
答案 0 :(得分:0)
如果要使用Calico,则必须为家庭LAN使用其他IP范围,因为Calico使用192.168.0.0/16
网络。您可以将家庭网络更改为10.0.0.0/8
或更小或更改为172.16.0.0/16
。另外,您可以为集群选择另一个CNI。在YAML中更改CALICO_IPV4POOL_CIDR是不够的。 IP范围192.168.0.0/16
在许多地方使用。
更新
如果使用默认值,则无需预先配置它,只需检查它是否是正确的端点即可。 从kubernetes docs:
提供的文件中# Calico Version v3.1.3
# https://docs.projectcalico.org/v3.1/releases#v3.1.3
# This manifest includes the following component versions:
# calico/node:v3.1.3
# calico/cni:v3.1.3
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
# To enable Typha, set this to "calico-typha" *and* set a non-zero value for Typha replicas
# below. We recommend using Typha if you have more than 50 nodes. Above 100 nodes it is
# essential.
typha_service_name: "none"
# The CNI network configuration to install on each node.
cni_network_config: |-
etcd_endpoints
不需要使用,因为它用作Kubernetes集群etcd。
新版Calico Calico doc中的
。配置
# Calico Version v3.2.3
# https://docs.projectcalico.org/v3.2/releases#v3.2.3
# This manifest includes the following component versions:
# calico/node:v3.2.3
# calico/cni:v3.2.3
# calico/kube-controllers:v3.2.3
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: calico-config
namespace: kube-system
data:
# Configure this with the location of your etcd cluster.
etcd_endpoints: "http://10.96.232.136:6666"
# If you're using TLS enabled etcd uncomment the following.
# You must also populate the Secret below with these files.
etcd_ca: "" # "/calico-secrets/etcd-ca"
etcd_cert: "" # "/calico-secrets/etcd-cert"
etcd_key: "" # "/calico-secrets/etcd-key"
# Configure the Calico backend to use.
calico_backend: "bird"
在最新版本的Calico中,您需要从服务IP池中手动为任何免费IP提供etcd_endpoints
,或者如果您使用默认设置,则可以保持不变。这将是一个新的etcd,将根据Calico的需要启动。您可以将Pod CIDR更改为任何池。现在可以了,我已经检查了。