# kubectl Usage Guide

Before running kubectl commands, you should have the kubectl development skills and understand the kubectl operations. For details, see Kubernetes API and kubectl CLI.

Go to the Kubernetes release page to download kubectl corresponding to the cluster version or a later version.

#### Cluster Connection

- Connecting to a Kubernetes cluster using kubectl

#### Workload Creation

- Creating a Deployment using kubectl
- Creating a StatefulSet using kubectl

#### Workload Affinity/Anti-affinity Scheduling

- Example YAML for workload-node affinity
- Example YAML for workload-node anti-affinity
- Example YAML for workload-workload affinity
- Example YAML for workload-workload anti-affinity
- Example YAML for workload-AZ affinity
- Example YAML for workload-AZ anti-affinity

#### Workload Access Mode Settings

- Implementing intra-cluster access using kubectl
- Implementing node access using kubectl
- Implementing Layer 4 load balancing using kubectl
- Implementing Layer 7 load balancing using kubectl

#### Advanced Workload Settings

- Example YAML for setting the container lifecycle

#### Job Management

- Creating a job using kubectl
- Creating a cron job using kubectl

#### Configuration Center

- Creating a ConfigMap using kubectl
- Creating a secret using kubectl

#### Storage Management

- Creating a PV using kubectl
- Creating a PVC using kubectl

Parent topic: Using kubectl to Run a Cluster