1
1
---
2
- title : " Introduction To Kubectl "
2
+ title : " Introduction to kubectl "
3
3
content_type : concept
4
4
weight : 1
5
5
---
6
6
7
- Kubectl is the Kubernetes cli version of a swiss army knife, and can do many things.
7
+ kubectl is the Kubernetes cli version of a swiss army knife, and can do many things.
8
8
9
- While this Book is focused on using Kubectl to declaratively manage Applications in Kubernetes, it
10
- also covers other Kubectl functions.
9
+ While this Book is focused on using kubectl to declaratively manage applications in Kubernetes, it
10
+ also covers other kubectl functions.
11
11
12
12
## Command Families
13
13
14
- Most Kubectl commands typically fall into one of a few categories:
14
+ Most kubectl commands typically fall into one of a few categories:
15
15
16
16
| Type | Used For | Description |
17
17
| ----------------------------------------| ----------------------------| ----------------------------------------------------|
18
- | Declarative Resource Management | Deployment and Operations (e.g. GitOps) | Declaratively manage Kubernetes Workloads using Resource Config |
19
- | Imperative Resource Management | Development Only | Run commands to manage Kubernetes Workloads using Command Line arguments and flags |
20
- | Printing Workload State | Debugging | Print information about Workloads |
21
- | Interacting with Containers | Debugging | Exec, Attach, Cp, Logs |
22
- | Cluster Management | Cluster Ops | Drain and Cordon Nodes |
18
+ | Declarative Resource Management | Deployment and operations (e.g. GitOps) | Declaratively manage Kubernetes workloads using resource configuration |
19
+ | Imperative Resource Management | Development Only | Run commands to manage Kubernetes workloads using Command Line arguments and flags |
20
+ | Printing Workload State | Debugging | Print information about workloads |
21
+ | Interacting with Containers | Debugging | Exec, attach, cp, logs |
22
+ | Cluster Management | Cluster operations | Drain and cordon Nodes |
23
23
24
24
## Declarative Application Management
25
25
26
- The preferred approach for managing Resources is through
27
- declarative files called Resource Config used with the Kubectl * Apply* command.
26
+ The preferred approach for managing resources is through
27
+ declarative files called resource configuration used with the kubectl * Apply* command.
28
28
This command reads a local (or remote) file structure and modifies cluster state to
29
29
reflect the declared intent.
30
30
31
31
{{< alert color="success" title="Apply" >}}
32
- Apply is the preferred mechanism for managing Resources in a Kubernetes cluster.
32
+ Apply is the preferred mechanism for managing resources in a Kubernetes cluster.
33
33
{{< /alert >}}
34
34
35
- ## Printing state about Workloads
35
+ ## Printing State about Workloads
36
36
37
- Users will need to view Workload state.
37
+ Users will need to view workload state.
38
38
39
- - Printing summarize state and information about Resources
40
- - Printing complete state and information about Resources
41
- - Printing specific fields from Resources
42
- - Query Resources matching labels
39
+ - Printing summarize state and information about resources
40
+ - Printing complete state and information about resources
41
+ - Printing specific fields from resources
42
+ - Query resources matching labels
43
43
44
44
## Debugging Workloads
45
45
46
- Kubectl supports debugging by providing commands for:
46
+ kubectl supports debugging by providing commands for:
47
47
48
48
- Printing Container logs
49
49
- Printing cluster events
@@ -52,20 +52,20 @@ Kubectl supports debugging by providing commands for:
52
52
53
53
## Cluster Management
54
54
55
- On occasion, users may need to perform operations to the Nodes of cluster. Kubectl supports
56
- commands to drain Workloads from a Node so that it can be decommission or debugged.
55
+ On occasion, users may need to perform operations to the Nodes of cluster. kubectl supports
56
+ commands to drain workloads from a Node so that it can be decommissioned or debugged.
57
57
58
58
## Porcelain
59
59
60
- Users may find using Resource Config overly verbose for * Development * and prefer to work with
61
- the cluster * imperatively* with a shell-like workflow. Kubectl offers porcelain commands for
62
- generating and modifying Resources .
60
+ Users may find using resource configuration overly verbose for * development * and prefer to work with
61
+ the cluster * imperatively* with a shell-like workflow. kubectl offers porcelain commands for
62
+ generating and modifying resources .
63
63
64
- - Generating + creating Resources such as Deployments, StatefulSets, Services, ConfigMaps, etc
65
- - Setting fields on Resources
66
- - Editing (live) Resources in a text editor
64
+ - Generating + creating resources such as Deployments, StatefulSets, Services, ConfigMaps, etc.
65
+ - Setting fields on resources
66
+ - Editing (live) resources in a text editor
67
67
68
- {{< alert color="warning" title="Porcelain For Dev Only" >}}
68
+ {{< alert color="warning" title="Porcelain for Dev Only" >}}
69
69
Porcelain commands are time saving for experimenting with workloads in a dev cluster, but shouldn't
70
70
be used for production.
71
71
{{< /alert >}}
0 commit comments