Azure / sg-aks-workshop

Security + Governance Workshop
Creative Commons Attribution 4.0 International
191 stars 272 forks source link

flux cannot be deployed - No connection could be made because the target machine actively refused it. #27

Open YSDimov opened 3 years ago

YSDimov commented 3 years ago

kubernetes_namespace.flux: Creating...

Error: Post http://localhost/api/v1/namespaces: dial tcp 127.0.0.1:80: connectex: No connection could be made because the target machine actively refused it.

on flux.tf line 13, in resource "kubernetes_namespace" "flux": 13: resource "kubernetes_namespace" "flux" {

aidacloud commented 2 years ago

This is due to AKS infrastructure state being in the same state file as Kubernetes state. Terraform has a non-deterministic behavior when providers have dependencies.

Best-practice is to separate the two into workspaces.