配置yml文件
apiVersion: v1
kind: ReplicationController
metadata:
name: nginxrc
spec:
replicas: 3
selector:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
1.创建:
create create -f XXX.yml
2.修改pod个数
kubectl scale rc nginxrc --replicas=2
3.查看 rc
kubectl get rc -o wide
4.删除 rc
kubectl delete rc xxx
5.滚动升级、回滚
kubectl rolling-update 原rc name -f xxx.yml --update-period=10s (XX秒一次升级)
QQ截图20191225144320.png
网友评论