Creating applications by using CLI
kubectl is the primary command-line interface (CLI) for interacting with Kubernetes clusters. It functions as a client for the Kubernetes API Server - a RESTful HTTP API that serves as the control plane's programmatic interface. All Kubernetes operations are exposed through API endpoints, and kubectl essentially translates CLI commands into corresponding API requests to manage cluster resources and application workloads (Deployments, StatefulSets, etc.).
The CLI tools facilitates application deployment by intelligently interpreting input artifacts (images, or Chart, etc.) and generating corresponding Kubernetes API objects. The generated resources vary based on input types:
- Image: Directly creates Deployment.
- Chart: Instantiates all objects defined in the Helm Chart.
TOC
Prerequisites
The Alauda Container Platform Web Terminal plugin is installed, and the web-cli switch is enabled.
Procedure
-
Contianer Platform, click the terminal icon in the lower-right corner.
-
Wait for session initialization (1-3 sec).
-
Execute kubectl commands in the interactive shell:
-
View real-time command output
Example
YAML
kubectl commands
Reference
- Conceptual Guide: kubectl Overview
- Syntax Reference: kubectl Cheat Sheet
- Command Manual: kubectl Commands