Installing calicoctl
About installing calicoctl
calicoctl
allows you to create, read, update, and delete Calico objects
from the command line. You can run it on any host with network access to the
Calico datastore in either of the following formats.
-
Binary: provides full functionality, including
node
commands for instances ofcalico/node
on the same host. -
Container: provides less functionality than the binary format, such as no use of the
node
commands.
Installing calicoctl as a binary
-
Log into the host, open a terminal prompt, and navigate to the location where you want to install the binary.
Tip: Consider navigating to a location that’s in your
PATH
. For example,/usr/local/bin/
. -
Use the following command to download the
calicoctl
binary.curl -O -L https://github.com/projectcalico/calicoctl/releases/download/v3.0.10/calicoctl
-
Set the file to be executable.
chmod +x calicoctl
Note: If the location of
calicoctl
is not already in yourPATH
, move the file to one that is or add its location to yourPATH
. This will allow you to invoke it without having to prepend its location.
Next step:
Configure calicoctl
to connect to your datastore.
Installing calicoctl as a container
If you are on Kubernetes, we provide two manifests that make it easy to deploy calicoctl
as a pod.
-
etcd datastore:
kubectl apply -f https://deploy-preview-2459--calico.netlify.com/v3.0/getting-started/kubernetes/installation/hosted/calicoctl.yaml
-
Kubernetes API datastore:
kubectl apply -f https://deploy-preview-2459--calico.netlify.com/v3.0/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calicoctl.yaml
In other environments, use the following command.
docker pull quay.io/calico/ctl:v3.0.10
Next step: