forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new document under docs/ with information on how to install (instructions valid starting with release 0.5.0) and use antctl. This is user-facing documentation and does not include information about the antctl implementation. We also do not include a detailed list of commands at the moment. This list can come later if needed (can be hard to keep up-to-date), and we can keep adding information about specific commands in troubleshooting.md for specific debugging scenarios. Fixes antrea-io#337
- Loading branch information
1 parent
244b831
commit e73a901
Showing
3 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Antctl | ||
|
||
Antctl is the command-line tool for Antrea. At the moment, antctl supports | ||
running in two different modes: | ||
* "controller mode": when run out-of-cluster or from within the Antrea | ||
Controller Pod, antctl can connect to the Antrea Controller and query | ||
information from it (e.g. the set of computed NetworkPolicies). | ||
* "agent mode": when run from within an Antrea Agent Pod, antctl can connect to | ||
the Antrea Agent and query information local to that Agent (e.g. the set of | ||
computed NetworkPolicies received by that Agent from the Antrea Controller, as | ||
opposed to the entire set of computed policies). | ||
|
||
## Installation | ||
|
||
The antctl binary is included in the Antrea Docker image | ||
(`antrea/antrea-ubuntu`) which means that there is no need to install anything | ||
to connect to the Antrea Agent. Simply exec into the antrea-agent container for | ||
the appropriate antrea-agent Pod and run `antctl`: | ||
``` | ||
kubectl exec -it <antrea-agent Pod name> -n kube-system -c antrea-agent bash | ||
> antctl help | ||
``` | ||
|
||
Starting with Antrea release v0.5.0, we publish the antctl binaries for | ||
different OS / CPU Architecture combinations. Head to the [releases | ||
page](https://github.com/vmware-tanzu/antrea/releases) and download the | ||
appropriate one for your machine. For example: | ||
|
||
On Mac & Linux: | ||
``` | ||
curl -Lo ./antctl "https://github.com/vmware-tanzu/antrea/releases/download/v0.5.0/antctl-$(uname)-x86_64" | ||
chmod +x ./antctl | ||
mv ./antctl /some-dir-in-your-PATH/antctl | ||
antctl version | ||
``` | ||
|
||
For Linux, we also publish binaries for Arm-based systems. | ||
|
||
On Windows: | ||
``` | ||
# if you have curl / curl.exe installed (otherwise download antctl with a browser) | ||
curl -Lo antctl.exe https://github.com/vmware-tanzu/antrea/releases/download/v0.5.0/antctl-windows-x86_64 | ||
Move-Item .\antctl-windows-x86_64.exe c:\some-dir-in-your-PATH\kubectl.exe | ||
antctl version | ||
``` | ||
|
||
## Usage | ||
|
||
To see the list of available commands and options, run `antctl help`. The list | ||
will be different based on whether you are connecting to the Antrea Controller | ||
or Agent. | ||
|
||
When running out-of-cluster ("controller mode" only), antctl will look for your | ||
kubeconfig file at `$HOME/.kube/config` by default. You can select a different | ||
one with `--kubeconfig`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters