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 of calico/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

  1. 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/.

  2. Use the following command to download the calicoctl binary.

    curl -O -L
  3. Set the file to be executable.

    chmod +x calicoctl

    Note: If the location of calicoctl is 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.

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
  • Kubernetes API datastore:

     kubectl apply -f

In other environments, use the following command.

docker pull

Next step:

Configure calicoctl to connect to your datastore.