1 # Calico Version v3.3.4
2 # https://docs.projectcalico.org/v3.3/releases#v3.3.4
3 # This manifest includes the following component versions:
8 # This ConfigMap is used to configure a self-hosted Calico installation.
14 namespace: kube-system
16 # To enable Typha, set this to "calico-typha" *and*
17 # set a non-zero value for Typha replicas
18 # below. We recommend using Typha if you have more than 50 nodes.
19 # Above 100 nodes it is essential.
20 typha_service_name: "none"
21 # Configure the Calico backend to use.
22 calico_backend: "bird"
24 # Configure the MTU to use
27 # The CNI network configuration to install on each node. The special
28 # values in this config will be automatically populated.
29 cni_network_config: |-
31 "name": "k8s-pod-network",
32 "cniVersion": "0.3.0",
37 "datastore_type": "kubernetes",
38 "nodename": "__KUBERNETES_NODE_NAME__",
42 "subnet": "usePodCidr"
48 "kubeconfig": "__KUBECONFIG_FILEPATH__"
54 "capabilities": {"portMappings": true}
62 # This manifest creates a Service,
63 # which will be backed by Calico's Typha daemon.
64 # Typha sits in between Felix and the API server,
65 # reducing Calico's load on the API server.
71 namespace: kube-system
78 targetPort: calico-typha
85 # This manifest creates a Deployment of Typha to back the above service.
87 apiVersion: apps/v1beta1
91 namespace: kube-system
95 # Number of Typha replicas.
96 # To enable Typha, set this to a non-zero value *and* set the
97 # typha_service_name variable in the calico-config ConfigMap above.
99 # We recommend using Typha if you have more than 50 nodes.
100 # Above 100 nodes it is essential
101 # (when using the Kubernetes datastore).
102 # Use one replica for every 100-200 nodes. In production,
103 # we recommend running at least 3 replicas to reduce the
104 # impact of rolling upgrade.
106 revisionHistoryLimit: 2
110 k8s-app: calico-typha
112 # This, along with the CriticalAddonsOnly toleration below,
113 # marks the pod as a critical
114 # add-on, ensuring it gets priority scheduling
115 # and that its resources are reserved
116 # if it ever gets evicted.
117 scheduler.alpha.kubernetes.io/critical-pod: ''
118 cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
121 beta.kubernetes.io/os: linux
124 # Mark the pod as a critical add-on for rescheduling.
125 - key: CriticalAddonsOnly
127 # Since Calico can't network a pod until Typha is up,
128 # we need to run Typha itself as a host-networked pod.
129 serviceAccountName: calico-node
131 - image: calico/typha:v3.3.4
134 - containerPort: 5473
138 # Enable "info" logging by default.
139 # Can be set to "debug" to increase verbosity.
140 - name: TYPHA_LOGSEVERITYSCREEN
142 # Disable logging to file and syslog
143 # since those don't make sense in K8s.
144 - name: TYPHA_LOGFILEPATH
146 - name: TYPHA_LOGSEVERITYSYS
148 # Monitor the Kubernetes API to find the number of running instances
149 # and rebalance connections.
150 - name: TYPHA_CONNECTIONREBALANCINGMODE
152 - name: TYPHA_DATASTORETYPE
154 - name: TYPHA_HEALTHENABLED
156 # Uncomment these lines to enable prometheus metrics.
157 # Since Typha is host-networked,
158 # this opens a port on the host, which may need to be secured.
159 # - name: TYPHA_PROMETHEUSMETRICSENABLED
161 # - name: TYPHA_PROMETHEUSMETRICSPORT
170 initialDelaySeconds: 30
180 # This manifest creates a Pod Disruption Budget
181 # for Typha to allow K8s Cluster Autoscaler to evict
183 apiVersion: policy/v1beta1
184 kind: PodDisruptionBudget
187 namespace: kube-system
189 k8s-app: calico-typha
194 k8s-app: calico-typha
198 # This manifest installs the calico/node container, as well
199 # as the Calico CNI plugins and network config on
200 # each master and worker node in a Kubernetes cluster.
202 apiVersion: extensions/v1beta1
205 namespace: kube-system
221 # This, along with the CriticalAddonsOnly toleration below,
222 # marks the pod as a critical add-on, ensuring it gets
223 # priority scheduling and that its resources are reserved
224 # if it ever gets evicted.
225 scheduler.alpha.kubernetes.io/critical-pod: ''
228 beta.kubernetes.io/os: linux
231 # Make sure calico-node gets scheduled on all nodes.
234 # Mark the pod as a critical add-on for rescheduling.
235 - key: CriticalAddonsOnly
239 serviceAccountName: calico-node
240 # Minimize downtime during a rolling upgrade or deletion;
241 # tell Kubernetes to do a "force deletion"
242 # https://kubernetes.io/docs/concepts
243 # /workloads/pods/pod/#termination-of-pods.
244 terminationGracePeriodSeconds: 0
246 # Runs calico/node container on each Kubernetes node. This
247 # container programs network policy and routes on each
250 image: calico/node:v3.3.4
252 # Use Kubernetes API as the backing datastore.
253 - name: DATASTORE_TYPE
255 # Typha support: controlled by the ConfigMap.
256 - name: FELIX_TYPHAK8SSERVICENAME
260 key: typha_service_name
261 # Wait for the datastore.
262 - name: WAIT_FOR_DATASTORE
264 # Set based on the k8s node name.
268 fieldPath: spec.nodeName
269 # Choose the backend to use.
270 - name: CALICO_NETWORKING_BACKEND
275 # Cluster type to identify the deployment type
278 # Auto-detect the BGP IP address.
282 - name: CALICO_IPV4POOL_IPIP
284 # Set MTU for tunnel device used if ipip is enabled
285 - name: FELIX_IPINIPMTU
290 # The default IPv4 pool to create on startup if none exists.
291 # Pod IPs will be chosen from this range.
292 # Changing this value after installation will have
293 # no effect. This should fall within `--cluster-cidr`.
294 - name: CALICO_IPV4POOL_CIDR
295 value: "192.168.0.0/16"
296 # Disable file logging so `kubectl logs` works.
297 - name: CALICO_DISABLE_FILE_LOGGING
299 # Set Felix endpoint to host default action to ACCEPT.
300 - name: FELIX_DEFAULTENDPOINTTOHOSTACTION
302 # Disable IPv6 on Kubernetes.
303 - name: FELIX_IPV6SUPPORT
305 # Set Felix logging to "info"
306 - name: FELIX_LOGSEVERITYSCREEN
308 - name: FELIX_HEALTHENABLED
321 initialDelaySeconds: 10
331 - mountPath: /lib/modules
334 - mountPath: /run/xtables.lock
337 - mountPath: /var/run/calico
340 - mountPath: /var/lib/calico
343 # This container installs the Calico CNI binaries
344 # and CNI network config file on each node.
346 image: calico/cni:v3.3.4
347 command: ["/install-cni.sh"]
349 # Name of the CNI config file to create.
350 - name: CNI_CONF_NAME
351 value: "10-calico.conflist"
352 # Set the hostname based on the k8s node name.
353 - name: KUBERNETES_NODE_NAME
356 fieldPath: spec.nodeName
357 # The CNI network config to install on each node.
358 - name: CNI_NETWORK_CONFIG
362 key: cni_network_config
363 # CNI MTU Config variable
370 - mountPath: /host/opt/cni/bin
372 - mountPath: /host/etc/cni/net.d
375 # Used by calico/node.
379 - name: var-run-calico
381 path: /var/run/calico
382 - name: var-lib-calico
384 path: /var/lib/calico
387 path: /run/xtables.lock
389 # Used to install CNI.
402 namespace: kube-system
406 # Create all the CustomResourceDefinitions needed for
407 # Calico policy and networking mode.
409 apiVersion: apiextensions.k8s.io/v1beta1
410 kind: CustomResourceDefinition
412 name: felixconfigurations.crd.projectcalico.org
415 group: crd.projectcalico.org
418 kind: FelixConfiguration
419 plural: felixconfigurations
420 singular: felixconfiguration
423 apiVersion: apiextensions.k8s.io/v1beta1
424 kind: CustomResourceDefinition
426 name: bgppeers.crd.projectcalico.org
429 group: crd.projectcalico.org
438 apiVersion: apiextensions.k8s.io/v1beta1
439 kind: CustomResourceDefinition
441 name: bgpconfigurations.crd.projectcalico.org
444 group: crd.projectcalico.org
447 kind: BGPConfiguration
448 plural: bgpconfigurations
449 singular: bgpconfiguration
453 apiVersion: apiextensions.k8s.io/v1beta1
454 kind: CustomResourceDefinition
456 name: ippools.crd.projectcalico.org
459 group: crd.projectcalico.org
468 apiVersion: apiextensions.k8s.io/v1beta1
469 kind: CustomResourceDefinition
471 name: hostendpoints.crd.projectcalico.org
474 group: crd.projectcalico.org
478 plural: hostendpoints
479 singular: hostendpoint
483 apiVersion: apiextensions.k8s.io/v1beta1
484 kind: CustomResourceDefinition
486 name: clusterinformations.crd.projectcalico.org
489 group: crd.projectcalico.org
492 kind: ClusterInformation
493 plural: clusterinformations
494 singular: clusterinformation
498 apiVersion: apiextensions.k8s.io/v1beta1
499 kind: CustomResourceDefinition
501 name: globalnetworkpolicies.crd.projectcalico.org
504 group: crd.projectcalico.org
507 kind: GlobalNetworkPolicy
508 plural: globalnetworkpolicies
509 singular: globalnetworkpolicy
513 apiVersion: apiextensions.k8s.io/v1beta1
514 kind: CustomResourceDefinition
516 name: globalnetworksets.crd.projectcalico.org
519 group: crd.projectcalico.org
522 kind: GlobalNetworkSet
523 plural: globalnetworksets
524 singular: globalnetworkset
528 apiVersion: apiextensions.k8s.io/v1beta1
529 kind: CustomResourceDefinition
531 name: networkpolicies.crd.projectcalico.org
534 group: crd.projectcalico.org
538 plural: networkpolicies
539 singular: networkpolicy