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
nodecommands for instances of
calico/nodeon the same host.
Container: provides less functionality than the binary format, such as no use of the
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,
Use the following command to download the
curl -O -L https://github.com/projectcalico/calicoctl/releases/download/v2.0.7/calicoctl
Set the file to be executable.
chmod +x calicoctl
Note: If the location of
calicoctlis not already in your
PATH, move the file to one that is or add its location to your
PATH. This will allow you to invoke it without having to prepend its location.
Installing calicoctl as a container
If you are on Kubernetes, we provide two manifests that make it easy to deploy
as a pod.
kubectl apply -f https://docs.projectcalico.org/v3.0/getting-started/kubernetes/installation/hosted/calicoctl.yaml
Kubernetes API datastore:
kubectl apply -f https://docs.projectcalico.org/v3.0/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calicoctl.yaml
In other environments, use the following command.
docker pull quay.io/calico/ctl:v2.0.7