ื—ืœืง 1 โ€” ืชื–ื›ื•ืจืช: Imperative ืขื kubectl

ื›ื‘ืจ ื”ืฉืชืžืฉื ื• ื‘ืคืงื•ื“ื•ืช ื›ืžื•:

kubectl run nginx-pod --image=nginx:1.27.0

ืœื™ืฆื™ืจืช Pod.

ื•ืœืžื—ื™ืงื”:

kubectl delete pod nginx-pod

ื•ื›ืŸ:

kubectl expose pod nginx-pod \
  --port=80 \
  --target-port=80 \
  --name=nginx-service

ืืœื• ื“ื•ื’ืžืื•ืช ืœ-Imperative Management ืขื kubectl โ€”

ืื ื—ื ื• ืื•ืžืจื™ื ื™ืฉื™ืจื•ืช ืœ-Kubernetes ืžื” ืœื‘ืฆืข.


ื—ืœืง 2 โ€” ื™ืฆื™ืจืช ืชื™ืงื™ื™ื” ื•ืงื•ื‘ืฅ YAML

ื ืขื‘ื•ืจ ืœ-IDE.

ื ื™ืฆื•ืจ ืชื™ืงื™ื™ื” ื—ื“ืฉื”, ืœื“ื•ื’ืžื”:

Object-Management

ื‘ืชื•ื›ื” ื ื™ืฆื•ืจ ืงื•ื‘ืฅ ื—ื“ืฉ:

nginx-pod.yaml

ื›ืจื’ืข ื”ืชื™ืงื™ื™ื” ืจื™ืงื” โ€” ื–ื” ื™ื”ื™ื” ื”-Manifest ื”ืจืืฉื•ืŸ ืฉืœื ื•.


ื—ืœืง 3 โ€” ื”ื’ื“ืจืช ื”ืฉื“ื•ืช ื”ืขืœื™ื•ื ื™ื