Azure / aksArc

# Welcome to the Azure Kubernetes Service on Azure Stack HCI repo This is where the AKS-HCI team will track features and issues with AKS-HCI. We will monitor this repo in order to engage with our community and discuss questions, customer scenarios, or feature requests. Checkout our projects tab to see the roadmap for AKS-HCI!
MIT License
109 stars 45 forks source link

[QUESTION/BUG] Changing Pod/Service CIDR #358

Closed Moezenka closed 8 months ago

Moezenka commented 8 months ago

Hi,

Background:

We are currently running aks-hybrid /w calico on Azure Stack HCI. The clusters have been provisioned using WAC.

Question

What is the correct way to change the Kubernetes Service Service & Pod Network CIDR? (post-install/day2)

Expected Behavior

Editing the AksHciCluster CR should reconcile the cluster to use the specified network configuration.

apiVersion: msft.microsoft/v1
kind: AksHciCluster
metadata:
  labels:
    msft.microsoft/capi-name: capi-for-moc
  name: my-cluster
  namespace: default
spec:
  clusterConfiguration:
    networkConfiguration:
      podCidr: 172.18.0.0/16        # EDIT
      serviceCidr: 10.128.0.0/12    # EDIT
...
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
  name: my-cluster
  namespace: default
spec:
  clusterNetwork:
    pods:
      cidrBlocks:
      - 172.18.0.0/16        # EDIT
    services:
      cidrBlocks:
      - 10.128.0.0/12        # EDIT
...

Current Behavior

Editing the AksHciCluster does not reconcile the network configuration. I've tried to edit the Cluster CR but that doesn't seem to do it either. I am just speculating but it is possible that this has not been implemented yet.

What is the correct procedure to go about this? 🤔

EDIT: fixed typo

Elektronenvolt commented 8 months ago

Hi @Moezenka All Kubernetes distributions I know allow you that at cluster creation only and not as day 2 operation. Things like using a different CNI provider, IP4 -> IP6, changing pod network CIDR,... For AKS Hybrid I remember a pod network CIDR config either at AKS Hybrid install or cluster creation. But I couldn't find it now by shortly scrolling through the docs (I only use the PowerShell option so far). Do you see a pod network CIDR setting in WAC?

Moezenka commented 8 months ago

All Kubernetes distributions I know allow you that at cluster creation only and not as day 2 operation. Things like using a different CNI provider, IP4 -> IP6, changing pod network CIDR,... For AKS Hybrid I remember a pod network CIDR config either at AKS Hybrid install or cluster creation.

Oh I see, thanks for the clarification. 😊

Do you see a pod network CIDR setting in WAC?

No, I don't think it's possible to configure this via Powershell or WAC as of now, it's on the roadmap though: #225