I have two questions:
Background:
Calico has a default Pod Network CIDR of 192.160.0.0/16 and the doco states it must not overlap with the physical network. I can change that setting in calico.yaml, but the documentation also states to configure the etc_endpoints.
Q1. Why do I need to configure the etcd_endpoint?
Q2. Where do I find the value?
If you want to use Calico, you must use a different IP range for your home LAN because Calico uses 192.168.0.0/16
network. You can change your home network to 10.0.0.0/8
or smaller or to 172.16.0.0/16
. As an alternative you can choose another CNI for you cluster. Changing CALICO_IPV4POOL_CIDR in YAML is not enough. The IP range 192.168.0.0/16
is used in many places.
Update
You don't need to pre-configure it if you use default values, only check if it’s the right endpoint. From the file provided by 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: |-
There is no need for etcd_endpoints
because it is used as a Kubernetes cluster etcd.
in official Calico doc new version of Calico.
Config
# 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"
In the newest version of Calico you need to provide etcd_endpoints
manually to any free IP, from the services IP pool, or if you use the default settings you can leave it as it is. It will be a new etcd which will be started for Calico needs. and you can change your pod CIDR to any pool. It works now, I`ve just checked it.