Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Access vRouter CLI

You can access the command-line interface (CLI) of the vRouter by accessing the shell of the running vRouter-agent container.

Note:

The commands below are provided as an example. The vRouter pod name must be replaced from your environment. The command outputs may differ based on your environment.

List the running pods on the K8s Cluster:

Copy the name of the vRouter pod—cjcnr-0-dp-contrail-vrouter-nodes-fslcb in this example output . You will use the pod name to connect to the running container's shell.

Issue the kubectl exec command to access the running container's shell:

where <namespace> identifies the namespace in which the pod is running, <pod name> specificies the name of the pod and the <container name> specifies the name of the container (to be specified if the pod has more than one container).

The vRouter pod has three containers. When the container name is not specified, the command will default to the vrouter-agent container shell. Here is an example:

At this point, you have connected to the vRouter's CLI.