Solved

Running .\main.ps1 -resource 'KUBERNETES' fails

  • 1 February 2023
  • 4 replies
  • 239 views

Badge +5

Hi Everyone,

 

I am setting up the middletier on an azure linux vm, and using an azure windows vm as the management server. Both of these are in one Virtual Private Network.

I could configure and run the ps> .\main.ps1 -resource 'KEY' step.

 

But when running the ps> .\main.ps1 -resource 'KUBERNETES' step, I get the below error.

 

 

Has anyone come across something similar to this?

The generated key from the ‘KEY’ step is in the authorized_keys file of ‘ifs’ user in middletier server.

Also I can SSH into the middletier server from the management server using ‘ssh ifs@managementserver’. It asks for the password though.

 

I also tied setting the PrvKeyFile variable in the main_config.json but no luck.

Thanks in advance.

icon

Best answer by devin.amarasekara 2 February 2023, 11:17

View original

4 replies

Badge +5

It was a permission issue on both windows side folders and keys, and as well as permission of the directories in linux and the files. Managed to solve by setting the right set of permissions.

Userlevel 3
Badge +7

Hi @devin.amarasekara ,
Would it be possible to elaborate on the steps taken to resolve this issue?

Badge +5

Hi @Shirantha Herath ,

I had to change the generated private key on the windows management server to ReadOnly and had to remove all the other users except the admin user I was using.

Afterwards I had to set proper permission for ‘ifs’ user in the middle tier vm. for the /home/ifs folder and its content. 

 

 

Had to enable PubkeyAuthentication in the sshd_config file in the middle tier as well. Since it was by default commented.

Since this was done on a Ubuntu VM in Azure had to do some configurations previously, during which permission for the folders and files werent properly set or modified.

Userlevel 3
Badge +7

@devin.amarasekara thank you very much for the detailed explanation

Reply