filmov
tv
kubernetes tutorial | Scheduling Pods to Nodes | Node Affinity | Demo
Показать описание
*Certified Kubernetes Administrator*
------------------------------------------------------------
kubernetes tutorial | Scheduling Pods to Nodes | Node Affinity | Demo
*Description*
----------------------
In this video, you are going to learn the concepts of Scheduling pods to nodes using Node Affinity and we are also going to see a demo on the same as well.
*Kubernetes - Scheduling Pods to Nodes using NodeAffinity*
---------------------------------------------------------------------------------------------------
1. Scheduling Pods to Nodes using “Node Affinity”
2. Scheduling Pods to Nodes Using Labels
3. Recap - NodeSelector
4. Node Affinity
5. Types of Node Affinity
6. Use Cases
7. DEMO: Scheduling Pods to Nodes using “Node Affinity”
8. Thank you
For suggestions/feedback/doubts contact
Happy Learning !!!
========================================================================================
*USEFUL LINKS*
----------------------------
*Assigning Pods to Nodes*
*Assigning Pods to Nodes using Node Affinity*
*API References*
*Kubectl Command Reference*
==========================================================================================
#vsparkz #kubernetes #k8s #containers
*DEMO STEPS*
-------------------------
*Step 1: Access & Inspect the Kubernetes Cluster*
$ kubectl cluster-info
$ kubectl get nodes
$ kubectl get pods -n kube-system
*Step 2: Add custom labels to the Nodes*
*Step 3: Create & Schedule a Pod using “Required” Affinity Type*
$ kubectl run nginx --image=nginx --dry-run=client -o yaml
_______________________________________________________
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
name: nginx
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: webserver
operator: In
values:
- nginx
_______________________________________________________
$ kubectl get pods -o wide
*Step 4: Create & Schedule a Pod using “Preferred” Affinity Type*
_______________________________________________________
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
name: nginx
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 10
preference:
matchExpressions:
- key: size
operator: In
values:
- large
_______________________________________________________
*Step 5: Create & Schedule a Pod using both “required” & “preferred” Affinity Type*
_______________________________________________________
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
name: nginx
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: workertype
operator: In
values:
- python
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 20
preference:
matchExpressions:
- key: size
operator: In
values:
- large
_______________________________________________________
$ kubectl get pods -o wide
========================================================================================================================
------------------------------------------------------------
kubernetes tutorial | Scheduling Pods to Nodes | Node Affinity | Demo
*Description*
----------------------
In this video, you are going to learn the concepts of Scheduling pods to nodes using Node Affinity and we are also going to see a demo on the same as well.
*Kubernetes - Scheduling Pods to Nodes using NodeAffinity*
---------------------------------------------------------------------------------------------------
1. Scheduling Pods to Nodes using “Node Affinity”
2. Scheduling Pods to Nodes Using Labels
3. Recap - NodeSelector
4. Node Affinity
5. Types of Node Affinity
6. Use Cases
7. DEMO: Scheduling Pods to Nodes using “Node Affinity”
8. Thank you
For suggestions/feedback/doubts contact
Happy Learning !!!
========================================================================================
*USEFUL LINKS*
----------------------------
*Assigning Pods to Nodes*
*Assigning Pods to Nodes using Node Affinity*
*API References*
*Kubectl Command Reference*
==========================================================================================
#vsparkz #kubernetes #k8s #containers
*DEMO STEPS*
-------------------------
*Step 1: Access & Inspect the Kubernetes Cluster*
$ kubectl cluster-info
$ kubectl get nodes
$ kubectl get pods -n kube-system
*Step 2: Add custom labels to the Nodes*
*Step 3: Create & Schedule a Pod using “Required” Affinity Type*
$ kubectl run nginx --image=nginx --dry-run=client -o yaml
_______________________________________________________
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
name: nginx
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: webserver
operator: In
values:
- nginx
_______________________________________________________
$ kubectl get pods -o wide
*Step 4: Create & Schedule a Pod using “Preferred” Affinity Type*
_______________________________________________________
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
name: nginx
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 10
preference:
matchExpressions:
- key: size
operator: In
values:
- large
_______________________________________________________
*Step 5: Create & Schedule a Pod using both “required” & “preferred” Affinity Type*
_______________________________________________________
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx
name: nginx
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: workertype
operator: In
values:
- python
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 20
preference:
matchExpressions:
- key: size
operator: In
values:
- large
_______________________________________________________
$ kubectl get pods -o wide
========================================================================================================================
Комментарии