Skip to content

Commit d4b9772

Browse files
committed
add discover command documentation
1 parent 5b7571c commit d4b9772

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

docs/user-guide/leverage-cli/reference/kubectl.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ The `kubectl` command is a wrapper for a containerized installation of [kubectl]
77

88
It transparently handles authentication, whether it is Multi-Factor or via Single Sign-On, on behalf of the user in the commands that require it. SSO Authentication takes precedence over MFA when both are active.
99

10-
The sub-commands can only be run at **layer** level and will not run anywhere else in the project.
10+
Some sub-commands can only be run at **layer** level (`discover` is an exception) and will not run anywhere else in the project.
1111
The sub-command `configure` can only be run at an **EKS cluster layer** level. Usually called `cluster`.
1212

1313
The command can also be invoked via its shortened version `kc`.
1414

1515
!!! info "Configuring on first use"
16-
To start using this command, you must first run `leverage kubectl configure` on a `cluster` layer,
17-
to set up the credentials on the proper config file.
16+
To start using this command, you must first run `leverage kubectl configure` on a `cluster` layer, to set up the credentials on the proper config file.
17+
18+
!!! info "Discovering clusters"
19+
You can now run the `discover` command from the root of the project to find and configure all the involved clusters.
1820

1921
---
2022
## `run`
@@ -54,3 +56,15 @@ leverage kubectl configure
5456

5557
Add the cluster from the EKS layer into your kubectl config file.
5658
Equivalent to `aws eks update-kubeconfig ...`.
59+
60+
---
61+
## `discover`
62+
63+
Scans the current directory and its subdirectories for Kubernetes (EKS) cluster metadata files. It then presents a menu to the user to select a cluster, which will be configured in the user's `kubectl` configuration file.
64+
65+
The command searches for files named `metadata.yaml` in the directory tree.
66+
67+
!!! warning "v1.18.0 version of the Reference Architecture is required"
68+
The metadata files are now autogenerated by the Reference Architecture. If you are using a version of the Reference Architecture prior to v1.18.0, you will need to create the metadata files manually.
69+
70+
This command can be run on any layer or from the root of the project. The current directory is used as the starting point for the search.

0 commit comments

Comments
 (0)