Managed Kubernetes
Latest
Frequently Asked Questions
Solutions
How Tos
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How to Drain A Kubernetes Node Using API
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
How to drain a node using k8s API?
Environment
- Platform9 Managed Kubernetes - v5.3 and Higher
Procedure
There is no single API call to perform node drain. However, you could drain the pods using the Eviction API but you have to write a custom script to run this for all pods running on the node.
Additional Information
Refer: https://kubernetes.io/docs/concepts/scheduling-eviction/api-eviction/ and https://pwittrock.github.io/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message