Introduction to Kubernetes
Frank Heilmann
Platform Architect and Freelance Instructor


apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 5
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.25.4
ports:
- containerPort: 80

kubectl คือเครื่องมือ command line สำหรับโต้ตอบกับ Kuberneteskubectl มีคำสั่งและตัวเลือกให้ใช้งานมากมายkubectl อ่าน Manifest แล้วส่งไปยัง Kubernetes ผ่าน API จากนั้น Kubernetes จะคำนวณว่าต้องทำอะไรเพื่อให้ได้สถานะที่ต้องการIntroduction to Kubernetes