You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/user-guide/leverage-cli/reference/kubectl.md
+17-3
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,16 @@ The `kubectl` command is a wrapper for a containerized installation of [kubectl]
7
7
8
8
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.
9
9
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.
11
11
The sub-command `configure` can only be run at an **EKS cluster layer** level. Usually called `cluster`.
12
12
13
13
The command can also be invoked via its shortened version `kc`.
14
14
15
15
!!! 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.
18
20
19
21
---
20
22
## `run`
@@ -54,3 +56,15 @@ leverage kubectl configure
54
56
55
57
Add the cluster from the EKS layer into your kubectl config file.
56
58
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