Welcome to the Linux Foundation Forum!

LFS 258 - Lab 3.3 - Exercise 1 - Node' name

The name of my nodes are IP Address. Did I do something wrong? Is it possible to change it to cp and worker?

ubuntu@ip-172-31-54-32:~$ kubectl get node
NAME STATUS ROLES AGE VERSION
ip-172-31-49-16 Ready 4h9m v1.27.1
ip-172-31-54-32 Ready control-plane 5d23h v1.27.1

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Answers

  • Hello @jordanofried,

    I think the node name is the same of hostname. I think you didn't change the hostname before the installation.

    Regards

  • There is no command to rename the node name...

    If you want to change the names then you will have to delete the node, reset the cluster and bootsrap again and join the worker nodes

    1. kubeadm reset
    2. follow the instruction from the reset output to clean up .kube config file
    3. hostnamectl set-hostname
  • Posts: 2

    Alternatively to changing the hostname (some cloud providers may be picky about it), you can pass the argument --node-name [name you want] to both kubeadm init/kubeadm join to set a custom node name.

  • Posts: 2,434

    Hi @jordanofried,

    The EC2 hostname is derived from the instance private IP address, and this should not cause any issues with the lab exercises.

    Regards,
    -Chris

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training