kubeadm Hosted Install
This document outlines how to install Calico on a cluster initialized with kubeadm. Calico is compatible with kubeadm-created clusters, as long as the requirements are met.
Requirements
For Calico to be compatible with your kubeadm-created cluster:
-
It must be running at least Kubernetes v1.7
-
There should be no other CNI network configurations installed in /etc/cni/net.d (or equivalent directory)
-
The kubeadm flag
--pod-network-cidr
must be set when creating the cluster withkubeadm init
and the CIDR(s) specified with the flag must match Calico’s IP pools. The default IP pool configured in Calico’s manifests is192.168.0.0/16
-
The CIDR specified with the kubeadm flag
--service-cidr
must not overlap with Calico’s IP pools-
The default CIDR for
--service-cidr
is10.96.0.0/12
-
The default IP pool configured in Calico’s manifests is
192.168.0.0/16
-
You can create a cluster compatible with these manifests by following the official kubeadm guide.
Installing Calico with a Kubernetes-hosted etcd
As a non-production quick start, to install Calico with a single-node dedicated etcd cluster, running as a Kubernetes pod:
-
Ensure your cluster meets the requirements (or recreate it if not).
-
Apply the single-node etcd manifest:
kubectl apply -f https://deploy-preview-2459--calico.netlify.com/v3.0/getting-started/kubernetes/installation/hosted/kubeadm/1.7/calico.yaml
Note: You can also view the YAML in your browser.
Installing with an existing etcd datastore
To install Calico, configured to use an etcd that you have already set-up:
-
Ensure your cluster meets the requirements (or recreate it if not).
Kubernetes datastore
To install Calico, configured to use the Kubernetes API as its sole data source:
-
Ensure your cluster meets the requirements (or recreate it if not).
Using calicoctl in a kubeadm cluster
The simplest way to use calicoctl in kubeadm is by running it as a pod. See Installing calicoctl as a container for more information.