Question

change ip ifscloud

  • 3 February 2023
  • 1 reply
  • 74 views

Badge +2

Hello,

I would like to change the ip address of my Ubuntu middleware server hosting microk8s.

How can I do ? What are the steps to respect please?

Thank you in advance for your help


1 reply

Userlevel 5
Badge +11

For the Ubuntu server, nothing. Just do whatever you do to your DNS records/network setup, and reboot the server. It will work as nothing changed.

For the Management Server though, you need to make some changes. The Kubernetes config file qualifies the host by IP address, and not the DNS name. Therefore this file has to be updated.

This file would be typically in two places in the Management Server:

  1. {IFSROOT}\config\kube\config
  2. %USERPROFILE%\.kube\config

Both these places will have to be updated.

To update the first place, run this in PowerShell:

cd {IFSROOT}
.\main.ps1 -resource 'GETKUBECONFIG'

This will get the new Kubernetes configuration from the MT server and place it in {IFSROOT}\config\kube\config.

Then, you have to copy this file to the second place:

  1. PowerShell: copy {IFSROOT}\config\kube\config $HOME\.kube\, or,
  2. CMD: copy {IFSROOT}\config\kube\config %USERPROFILE%\.kube\.

That’s it!

Note: {IFSROOT} is the root directory of your management server directory hierarchy, typically called an IFSROOT. You may need to replace the correct path of the directory in the commands.

Reply