Skip to content

Commit fd780b1

Browse files
committed
Create kubectl.md sheetcheat
1 parent 43fddd4 commit fd780b1

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

kubectl.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1-
## Getting started
1+
---
2+
title: kubectl
3+
category: kubernetes
4+
layout: 2017/sheet
5+
tags: [Featured]
6+
updated: 2020-05-16
7+
weight: -10
8+
intro: |
9+
Kubectl is a command line tool for controlling Kubernetes clusters. `kubectl` looks for a file named config in the $HOME/.kube directory. You can specify other [kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) files by setting the KUBECONFIG environment variable or by setting the [--kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) flag.
10+
11+
This overview covers kubectl syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the [kubectl](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands/) reference documentation. For installation instructions see [installing kubectl](https://kubernetes.io/docs/tasks/kubectl/install/).
12+
---
13+
14+
Getting started
15+
---------------
216

317
### Kubectl Autocomplete
418

519
#### BASH
620

721
```bash
8-
source <(kubectl completion bash) # active l'auto-complétion pour bash dans le shell courant, le paquet bash-completion devant être installé au préalable
9-
echo "source <(kubectl completion bash)" >> ~/.bashrc # ajoute l'auto-complétion de manière permanente à votre shell bash
22+
source <(kubectl completion bash) # setup autocomplete in bash into the current shell, bash-completion package should be installed first.
23+
echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.
1024
```
1125

1226
You can also use a shorthand alias for `kubectl` that also works with completion:
@@ -19,8 +33,8 @@ complete -F __start_kubectl k
1933
#### ZSH
2034

2135
```zsh
22-
source <(kubectl completion zsh) # active l'auto-complétion pour zsh dans le shell courant
23-
echo "if [ $commands[kubectl] ]; then source <(kubectl completion zsh); fi" >> ~/.zshrc # ajoute l'auto-complétion de manière permanente à votre shell zsh
36+
source <(kubectl completion zsh) # setup autocomplete in zsh into the current shell
37+
echo "[[ $commands[kubectl] ]] && source <(kubectl completion zsh)" >> ~/.zshrc # add autocomplete permanently to your zsh shell
2438
```
2539

2640
### Kubectl Context and Configuration
@@ -357,7 +371,8 @@ Kubectl verbosity is controlled with the `-v` or `--v` flags followed by an inte
357371
| `--v=8` | Display HTTP request contents. |
358372
| `--v=9` | Display HTTP request contents without truncation of contents. |
359373

360-
## See Also
374+
See Also
375+
--------
361376

362377
* [Official tutorial](https://kubernetes.io/docs/tutorials/)
363378
* Learn more about [Overview of kubectl](https://kubernetes.io/docs/reference/kubectl/overview/)

0 commit comments

Comments
 (0)