Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for K8s Exercise: Pod Placement
Akshay Rao
Akshay Rao

Posted on

K8s Exercise: Pod Placement

Introduction
Hi, I am Akshay Rao, will be starting a exercise series on k8s.
In this blog there will not explanation only problems and solutions.if you want explanation have a look at this series:-
https://dev.to/aksrao1998/series/24887

Pre-requisite
have minikube or kind running in the local machine.

Note:- k is alias for kubectl.

Problem 1
Create a pod that will be deployed to a Node that has the label 'accelerator=nvidia-tesla-p100'

Solution

[~ (⎈|minikube:mynamespace)]$ k label node minikube accelerator=nvidia-tesla-p100node/minikube labeled
Enter fullscreen modeExit fullscreen mode

Problem 2
Taint a node with key tier and value frontend with the effect NoSchedule. Then, create a pod that tolerates this taint.

Solution

[~ (⎈|minikube:mynamespace)]$ k taint nodes minikube tier=frontend:NoSchedulenode/minikube tainted
Enter fullscreen modeExit fullscreen mode

i hope this helps you
Thank you

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Devops Engineer
  • Location
    Tokyo,Japan
  • Joined

More fromAkshay Rao

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp