-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpodaffinity.txt
More file actions
29 lines (22 loc) · 851 Bytes
/
Copy pathpodaffinity.txt
File metadata and controls
29 lines (22 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
kubectl create -f podaffnity.yaml
kubectl describe pod/pod-with-pod-affinity
vi podaff.yaml
kubectl create -f podaff.yaml
kubectl describe pod/pod-with-pod-affinity
Test anti affinity
kubectl create -f podantiaff.yaml
kubectl describe pod/antiaffinitypod
Now create pod with anti affinity
kubectl create -f podantiaffinity.yaml
kubectl describe pod/pod-with-pod-anti-affinity
Node affinity
kubectl describe pod/with-node-affinity
cat nodeaffinity.yaml
kubectl describe pod/with-node-affinity
kubectl delete pod/with-node-affinity
vi with-affinity-antiaffinity.yaml
kubectl create -f with-affinity-antiaffinity.yaml
kubectl describe pod/with-affinity-anti-affinity
vi with-affinity-antiaffinity.yaml
kubectl describe pod/with-affinity-anti-affinity
kubectl delete pod/with-affinity-anti-affinity