Octopus Server in a AKS Pod

Hi,

I have spun up Octopus Deploy in a pod in AKS.
I have two workers which are not in AKS and are in the on-prem network.

During one of my deployments, Worker is trying to get an artifact from the Octopus Server and fails.

I realised that the worker is trying to access Octopus Server with a URL which is the pod’s URL within AKS, while we have an internal domain for accessing Octopus Server.

I am wondering if we can change a configuration in the Worker or Octopus Server so that they see each other.

Octopus web request (GET: http://octopusdeploy-web-7d54877985-dc6gq:8080/api/projects/all) failed & will be retried in 30 seconds: 
The remote name could not be resolved: 'octopusdeploy-web-7d54877985-dc6gq' 
Octopus web request (GET: http://octopusdeploy-web-7d54877985-dc6gq:8080/api/projects/all) failed & will be retried in 60 seconds: 
The remote name could not be resolved: 'octopusdeploy-web-7d54877985-dc6gq' 
Octopus web request (GET: http://octopusdeploy-web-7d54877985-dc6gq:8080/api/projects/all) failed & will be retried in 120 seconds: 
The remote name could not be resolved: 'octopusdeploy-web-7d54877985-dc6gq' 
Octopus web request (GET: http://octopusdeploy-web-7d54877985-dc6gq:8080/api/projects/all) failed & the maximum number of retries has been exceeded:
The remote name could not be resolved: 'octopusdeploy-web-7d54877985-dc6gq' 
The action Deploy on a Worker failed

Hi @Hossein.Margani,

Thanks for reaching out.

I believe you need to go change the Server URI within the configuration. Can you please try that? Go to Configuration->Nodes->Change (Server URI)

Please let me know if that fixes it or if we need to dig in more.

Thanks,
Jeremy

I did that, but after deploying the same project again, it is still requesting the pod’s URL. Do I need to restart or something?

Hi @Hossein.Margani,

When you set that you will need to use the Octopus.Web.ServerUri variable and not the Octopus.Web.BaseUrl variable.

Can you please give that a try and let me know if it works?

Thanks,
Jeremy

Where should I use Octopus.Web.ServerUri variable? I don’t follow.

Hi @Hossein.Margani,

Sorry if I misunderstood, but I thought you were making manual API calls. What is the process you are doing above that is resulting in the error? Please provide as much detail as possible.

Thanks,
Jeremy

I think I found the problem.

I was using an old version of Chain Deployment step template and it was using $OctopusParameters['Octopus.Web.BaseUrl'] in it’s code which is not correct.

I updated to the latest version which they have fixed it.

Thank you.

1 Like

Hi @Hossein.Margani,

Thanks for updating me with the resolution. I’m glad you found the offending code.

I hope you have a great rest of your week.

Thanks,
Jeremy