Upgrading Calico on Kubernetes
About upgrading Calico
This page describes how to upgrade to master from Calico v3.0 or later. The procedure varies by datastore type.
-
Upgrading an installation that uses the Kubernetes API datastore
-
Upgrading an installation that connects directly to an etcd datastore
Important: Do not use older versions of
calicoctl
after the upgrade. This may result in unexpected behavior and data.
Upgrading an installation that uses the Kubernetes API datastore
-
Download the master manifest that corresponds to your original installation method.
Calico for policy and networking
curl \ https://deploy-preview-2459--calico.netlify.com/master/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml \ -O
Calico for policy and flannel for networking
curl \ https://deploy-preview-2459--calico.netlify.com/master/getting-started/kubernetes/installation/hosted/canal/canal.yaml \ -O
Calico for policy (advanced)
curl \ https://deploy-preview-2459--calico.netlify.com/master/getting-started/kubernetes/installation/hosted/kubernetes-datastore/policy-only/1.7/calico.yaml \ -O
Note: If you manually modified the manifest, you must manually apply the same changes to the downloaded manifest.
-
Use the following command to initiate a rolling update, after replacing
<manifest-file-name>
with the file name of your master manifest.kubectl apply -f <manifest-file-name>
-
Watch the status of the upgrade as follows.
watch kubectl get pods -n kube-system
Verify that the status of all Calico pods indicate
Running
. -
Remove any existing
calicoctl
instances, install the newcalicoctl
and configure it to connect to your datastore. -
Use the following command to check the Calico version number.
calicoctl version
It should return a
Cluster Version
ofmaster.x
. -
Congratulations! You have upgraded to Calico master.
Upgrading an installation that uses an etcd datastore
-
Download the master manifest that corresponds to your original installation method.
Calico for policy and networking
curl \ https://deploy-preview-2459--calico.netlify.com/master/getting-started/kubernetes/installation/hosted/calico.yaml \ -O
Calico for policy and flannel for networking
curl \ https://deploy-preview-2459--calico.netlify.com/master/getting-started/kubernetes/installation/hosted/canal/canal-etcd.yaml \ -O
Note: You must must manually apply the changes you made to the manifest during installation to the downloaded master manifest. At a minimum, you must set the
etcd_endpoints
value. -
Use the following command to initiate a rolling update, after replacing
<manifest-file-name>
with the file name of your master manifest.kubectl apply -f <manifest-file-name>
-
Watch the status of the upgrade as follows.
watch kubectl get pods -n kube-system
Verify that the status of all Calico pods indicate
Running
.Tip: The calico-node pods will report
1/2
in theREADY
column, as shown. -
Remove any existing
calicoctl
instances, install the newcalicoctl
and configure it to connect to your datastore. -
Use the following command to check the Calico version number.
calicoctl version
It should return a
Cluster Version
ofmaster
. -
Congratulations! You have upgraded to Calico master.