Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 1.07 KB

S02_L02_Introducing Kubernetes Resources.md

File metadata and controls

58 lines (43 loc) · 1.07 KB

Introducing Kubernetes Resources

Links

Demo Reference

Log in to your Kubernetes control plane server.

Get a list of resources available in the cluster.

kubectl api-resources

Get detailed documentation for the pods resource.

kubectl explain pod

Create a YAML manifest file for a Pod.

vi my-pod.yml
apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
  - name: nginx
    image: nginx:stable

Create the Pod.

kubectl apply -f my-pod.yml

Get a list of Pods in the default Namespace.

kubectl get pods

Delete the Pod.

kubectl delete pod my-pod