Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubectl command documentation #154

Merged
merged 4 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/user-guide/leverage-cli/install-leverage-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Options:
Commands:
aws Run AWS CLI commands in a custom containerized environment.
credentials Manage AWS cli credentials.
kubectl Run Kubectl commands in a custom containerized environment.
project Manage a Leverage project.
run Perform specified task(s) and all of its dependencies.
terraform Run Terraform commands in a custom containerized...
Expand Down
1 change: 1 addition & 0 deletions docs/user-guide/leverage-cli/reference/basic-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Options:
Commands:
aws Run AWS CLI commands in a custom containerized environment.
credentials Manage AWS cli credentials.
kubectl Run Kubectl commands in a custom containerized environment.
project Manage a Leverage project.
run Perform specified task(s) and all of its dependencies.
terraform Run Terraform commands in a custom containerized...
Expand Down
28 changes: 28 additions & 0 deletions docs/user-guide/leverage-cli/reference/kubectl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Command: `kubectl`

!!! info "Regarding Leverage Toolbox versions"
For using this feature Leverage Toolbox versions `<define>` and up, or `<define>` and up must be used.
Franr marked this conversation as resolved.
Show resolved Hide resolved

The `kubectl` command is a wrapper for a containerized installation of [kubectl](https://kubernetes.io/docs/reference/kubectl/). It provides the kubectl executable with specific configuration values required by Leverage.

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.

This command can only be run at **layer** level and will not run anywhere else in the project.

---
## `run`

### Usage
``` bash
leverage kubectl [commands] [arguments]
```

Equivalent to `kubectl`.

All arguments given are passed as received to kubectl.

**Example:**

```bash
leverage kubectl get pods --namespace monitoring
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ nav:
- layers: "user-guide/leverage-cli/reference/terraform/layers.md"
- tfautomv: "user-guide/leverage-cli/reference/tfautomv.md"
- run: "user-guide/leverage-cli/reference/run.md"
- kubectl: "user-guide/leverage-cli/reference/kubectl.md"
- Extending Leverage:
- Overview: "user-guide/leverage-cli/extending-leverage/index.md"
- build.env : "user-guide/leverage-cli/extending-leverage/build.env.md"
Expand Down