Deploy Cluster without Kube-Proxy
Customer would like to deploy Cluster without Kube-Proxy.
Example scenario:
Customers would like to deploy a cluster with BYO CNI + Cilium and not have the cluster contain Kube-Proxy.
Stems from #1846
currently, just specifying
kubeProxyConfig:
enabled: false
throws a validation error
{"code": "KubeProxyConfigDisabledBYOCNIOnly", "message": "Preflight validation check for resource(s) for container service {myAks} in resource group {myResourceGroup} failed. Message: Disabling kube-proxy is only allowed for bring your own (BYO) CNI clusters. For more information, please check https://aka.ms/byo-cni. Details: "}
is this check going to go away?
@chasewilson Below command create AKS with BYO CNI and without kube-proxy:
kube-proxy-config.json
{
"enabled": false,
"mode": "IPVS",
"ipvsConfig": {
"scheduler": "LeastConnection",
"TCPTimeoutSeconds": 900,
"TCPFINTimeoutSeconds": 120,
"UDPTimeoutSeconds": 300
}
}
az aks create -n $clusterName -g $resourceGroup --location $location `
--kube-proxy-config .\kube-proxy-config.json `
--nodepool-name "system" `
--vm-set-type VirtualMachineScaleSets `
--node-count 2 `
--node-vm-size Standard_B2as_v2 `
--max-pods 50 `
--load-balancer-sku standard `
--enable-private-cluster `
--dns-name-prefix $clusterName `
--kubernetes-version 1.29.7 `
--vnet-subnet-id $podSubnetId `
--service-cidr "10.255.0.0/16" `
--dns-service-ip "10.255.0.10" `
--network-plugin none
@thewisenerd And I believe that is correct. If you use BYO CNI then you can disable installing kube-proxy. With Azure CNI powered by Cilium kube-proxy is not being installed by default.
@chasewilson Below command create AKS with BYO CNI and without kube-proxy:
kube-proxy-config.json { "enabled": false, "mode": "IPVS", "ipvsConfig": { "scheduler": "LeastConnection", "TCPTimeoutSeconds": 900, "TCPFINTimeoutSeconds": 120, "UDPTimeoutSeconds": 300 } } az aks create -n $clusterName -g $resourceGroup --location $location ` --kube-proxy-config .\kube-proxy-config.json ` --nodepool-name "system" ` --vm-set-type VirtualMachineScaleSets ` --node-count 2 ` --node-vm-size Standard_B2as_v2 ` --max-pods 50 ` --load-balancer-sku standard ` --enable-private-cluster ` --dns-name-prefix $clusterName ` --kubernetes-version 1.29.7 ` --vnet-subnet-id $podSubnetId ` --service-cidr "10.255.0.0/16" ` --dns-service-ip "10.255.0.10" ` --network-plugin none@thewisenerd And I believe that is correct. If you use BYO CNI then you can disable installing kube-proxy. With Azure CNI powered by Cilium kube-proxy is not being installed by default.
That is for sure the known (but not well documented) workaround, but there are few things making it troublesome. Firstly it does depend on #1846 which is not in GA and its latest update was "GA ETA: Retiring" due to Cilium, which at least in my mind does create worst case scenario that it might be removed in future API changes. Secondly Terraform for example doesn't get from API proper information to be able to track its state. Third, deploying Cilium with AKS with built-in feature, does deploy very old version of it. I and my customers would prefer controlling Cilium version independently with Helm as we are doing already.
@thewisenerd and @kc8421
Thanks for the this here. This isn't dependent on IPVS and can be done as @thewisenerd has described. The docs are confusing and it's not clear that this isn't dependent on IPVS. So, I'll update the docs to move the information somewhere less confusing!
Thank you for the input here and just to provide wrap up the recommendation in this thread if you're reading the bottom to catch the latest, please use @thewisenerd s instructions he provided earlier in this thread.
EDIT: I'll close this issue when docs update is complete and merged
@chasewilson apologies, I do not understand this completely. Are you stating that just specifying kubeProxyConfig.enabled=false will no longer throw a validation error, and start working? any specific Microsoft.ContainerService/managedClusters API version to test this with?
or, is both kubeProxyConfig.enabled=false and --network-plugin none needed?
@chasewilson apologies, I do not understand this completely. Are you stating that just specifying
kubeProxyConfig.enabled=falsewill no longer throw a validation error, and start working? any specificMicrosoft.ContainerService/managedClustersAPI version to test this with?or, is both
kubeProxyConfig.enabled=falseand--network-plugin noneneeded?
@thewisenerd you can take a look at this blog that I wrote sometime back and see if it helps- https://medium.com/@amitmavgupta/installing-cilium-in-azure-kubernetes-service-byocni-with-no-kube-proxy-825b9007b24b
@thewisenerd, at least based on documentation you must use *-preview API to even get the kubeProxyConfig out of it. For example 2024-09-01 doesn't have it, while 2024-09-02-preview does have it. Already year old preview API version does have it. Based on my experience you still need both kubeProxyConfig.enabled=false and --network-plugin none if you don't run with Azure CNI with Cilium (as mentioned earlier by the @bartwitkowski).
Any update on this? Do we know when kube-proxy disabling is official supported on the AKS API?
I am also wondering if there's an update regarding this matter. The TF provider only supports functionality that is in the stable version of the API, and we would really like to deploy a cluster with BYOC with kube-proxy disabled using Terraform
Gentle ping. Any ETA?
Q2 is the estimated GA ETA for this feature.
Gentle nudge again. Any ETA to be provided?