Kubernetes Fundamentals
Core objects: Pods, Deployments, Services, ConfigMaps, Secrets.
| YAML |
|---|
| apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 2
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
image: nginx:stable
|
| Bash |
|---|
| kubectl apply -f deploy.yaml
kubectl get pods,svc
|