Closed gmcquillan closed 8 years ago
There is a calico/ctl
image which can be used:
docker run --rm --net=host calico/ctl
Override the host:port of the ETCD server by setting the environment variable:
ETCD_ENDPOINTS [example: http://1.2.3.4:2379,http://1.2.3.5:2379]
or, if ETCD_ENDPOINTS is left unset:
ETCD_AUTHORITY [default: 127.0.0.1:2379]
Usage: calicoctl <command> [<args>...]
status Print current status information
node Configure the main calico/node container and establish Calico networking
container Configure containers and their addresses
profile Configure endpoint profiles
endpoint Configure the endpoints assigned to existing containers
pool Configure ip-pools
bgp Configure global bgp
ipam Configure IP address management
checksystem Check for incompatibilities on the host system
diags Save diagnostic information
version Display the version of calicoctl
config Configure low-level component configuration
See 'calicoctl <command> --help' to read about a specific subcommand.
Not all of the options work (e.g. node or diags won't work) but things that just talk to etcd should be fine.
Maybe I could improve it then we could look towards including a wrapper script on kubernetes installs that make it a little easier to call?
Yeah, that's a good point. I always forget we can just bring our tools with us in a container. I'll give that a shot. Mostly, I was attempting to set up a peering arrangement and this caused a minor inconvenience.
Closing as resolved, but let me know if should be re-opened
@tomdee @aaronlevy
Using calico/ctl
doesn't work well when using '--runtime=rkt' due to missing sudo
. Our deployment is based on CoreOS+rktnetes.
Also, it would be nice if one could set the 'runtime' and 'backend' as environment variables, making it easy to pass this to docker run via a shell script: e.g.
#!/bin/sh
# allow for overrides, otherwise make config static
: ${CALICO_RUNTIME:=rkt}
: ${CALICO_BACKEND:=gobgp}
exec docker run --rm --net=host \
-e "ETCD_AUTHORITY=x.x.x.x:2379" \
-e "CALICO_RUNTIME=${CALICO_RUNTIME}" \
-e "CALICO_BACKEND=${CALICO_BACKEND}" \
calico/ctl "$@"
I'll raise this with the calico team
In cases where people are using the Calico networking CNI, calicoctl should be included so you can make changes to the network, diagnose issues.