How to get node-id (for delete-node)?

doctl kubernetes cluster node-pool delete-node <cluster-id|cluster-name> <pool-id|pool-name> <node-id> [flags] (Please scroll left and right if the command is too long)

Please note how we have the option to use name instead of id for cluster and pool. However, for node, we must use id. Where can we find this id?

I could only find the name of the node (using node-pool list), but passing the name results in 404 could not find worker node

Thank you for your time and help!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there,

You can use the below options to list the ID of the worker nodes:

  1. doctl kubernetes cluster node-pool list <cluster-id|cluster-name> -o json
  2. doctl kubernetes cluster get <cluster-id|cluster-name> -o json
  3. doctl kubernetes cluster node-pool get <cluster-id|cluster-name> <pool-id|pool-name> -o json
  4. doctl compute droplet list | grep k8s:worker

Note :: Worker nodes come with the “k8s:worker” tag

I hope this helps!

Best Regards, Purnima Kumari

One potential solution: doctl kubernetes cluster node-pool list <cluster-id|cluster-name> [flags] outputs <node-id>, but -o json must be used