Skip to content

Disabling public network access and using UserDefinedRouting #3690

@andrewkreuzer

Description

@andrewkreuzer

Describe your scenario
I have created a cluster with outbound_type = UserDefinedRouting and public_network_access_enabled = false using the terraform provider. I am now receiving error:

Code="BadRequest" Message="UserDefinedRouting is not supported when Cluster has public network access set to Disabled.

or from the portal:

Failed to save Kubernetes service 'MyCluster'.
Error: UserDefinedRouting is not supported when Cluster has
public network access set to Disabled.

A support ticket was opened and I was told:

When running a Terraform plan that includes the option/value "publicnetworkaccess: 'disabled'" and using a UDR, the cluster creation should have failed validation and the cluster should not have been created. Prior to the last Azure CLI update, this validation was skipped and the cluster was allowed to be built, however, that should not have been allowed

Feedback
I'm confused as to why this is not supported.

Setting private_cluster_enabled keeps the api endpoint within the vnet, setting public_network_access_enabled to false keeps the loadbalancer within our vnet, and using outbound_type UserDefinedRouting to control egress traffic through our firewall ensures we control all outbound traffic. The fact that this was allowed and the cluster is functioning is more confusing. If this is intended to not be supported why does it work?

We're now stuck in a state where we can't make changes to the cluster unless we enable public access (which would cause cluster re-creation)... and we have three clusters.

If there's something I'm misunderstanding or a technical reason as to why this is not supported I would be grateful of some insight

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeedbackGeneral feedback

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions