Home › Kubernetes Tutorial › All commands
All commands
Every command of this course: name, detailed description, syntax and example code.
Every command used in this course, with its name, a detailed description, the syntax and an example.
kubectl
Definition: You talk to it with the kubectl command line tool.
Syntax:
kubectl
Example:
kubectl version --client
apiVersion
Definition: Every manifest has apiVersion , kind , metadata and spec .
Syntax:
apiVersion
Example:
apiVersion: v1
kind
Definition: Every manifest has apiVersion , kind , metadata and spec .
Syntax:
kind
Example:
kind: Pod
metadata
Definition: Every manifest has apiVersion , kind , metadata and spec .
Syntax:
metadata
Example:
metadata:
spec
Definition: Every manifest has apiVersion , kind , metadata and spec .
Syntax:
spec
Example:
spec:
selector
Definition: The selector must match the labels in the Pod template .
Syntax:
selector
Example:
selector:
template
Definition: The selector must match the labels in the Pod template .
Syntax:
template
Example:
template:
NodePort
Definition: NodePort opens a port (30000-32767) on every node.
Syntax:
NodePort
Example:
kubectl expose deployment web --type=NodePort --port=80
valueFrom
Definition: Use valueFrom to take one value from a ConfigMap ( configMapKeyRef ) or a Secret ( secretKeyRef ) and expose it as an environment variable.
Syntax:
valueFrom
Example:
valueFrom:
configMapKeyRef
Definition: Use valueFrom to take one value from a ConfigMap ( configMapKeyRef ) or a Secret ( secretKeyRef ) and expose it as an environment variable.
Syntax:
configMapKeyRef
Example:
configMapKeyRef:
secretKeyRef
Definition: Use valueFrom to take one value from a ConfigMap ( configMapKeyRef ) or a Secret ( secretKeyRef ) and expose it as an environment variable.
Syntax:
secretKeyRef
Example:
secretKeyRef:
requests
Definition: requests reserve CPU and memory for scheduling, and limits cap what a container may use.
Syntax:
requests
Example:
requests:
limits
Definition: requests reserve CPU and memory for scheduling, and limits cap what a container may use.
Syntax:
limits
Example:
limits:
Example code
kubectl version --client