1.Kubectl创建Deployment的过程

kubectl run nginx-deployment --image=nginx:1.7.9 --replicas=2
kubectl get replicaset
kubectl describe replicaset nginx-deployment-7c7d6486fc
kuebctl get pods
kubectl describe pod nginx-deployment-7c7d6486fc-btwcd
2.nginx-deployment配置文件。
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
run: nginx-deployment
name: nginx-deployment
namespace: default
spec:
replicas: 2
selector:
matchLabels:
run: nginx-deployment
template:
metadata:
labels:
run: nginx-deployment
spec:
containers:
- image: nginx:1.7.9
imagePullPolicy: IfNotPresent
name: nginx-deployment
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
restartPolicy: Always
kubectl apply -f file.yaml
niginx-deployment配置文件简介,

3.将master作为node用来调度,解除master限制。

4.FailOver(k8s失败重试机制)



5.用label控制pod的位置





网友评论