kubernetes-sigs / cloud-provider-azure

Cloud provider for Azure
https://cloud-provider-azure.sigs.k8s.io/
Apache License 2.0
256 stars 269 forks source link

Public IP of Ingress-Nginx is not accessible only for CAPZ in v1.29.x #6450

Closed Kun483 closed 1 week ago

Kun483 commented 1 week ago

Thanks in advance!!

What happened:

After cluster is launched using clusterctl, I used helm to install Ingress-Nginx. After Ingress-Nginx service is ready, I put Public IP into the browser, it showed:

image

What you expected to happen:

image

How to reproduce it (as minimally and precisely as possible):

Follow the Clusterctl quick-start to launch a cluster

kind create cluster
export AZURE_SUBSCRIPTION_ID="<SubscriptionId>"
export AZURE_TENANT_ID="<Tenant>"
export AZURE_CLIENT_ID="<AppId>"
export AZURE_CLIENT_SECRET="<Password>"
export AZURE_SUBSCRIPTION_ID_B64="$(echo -n "$AZURE_SUBSCRIPTION_ID" | base64 | tr -d '\n')"
export AZURE_TENANT_ID_B64="$(echo -n "$AZURE_TENANT_ID" | base64 | tr -d '\n')"
export AZURE_CLIENT_ID_B64="$(echo -n "$AZURE_CLIENT_ID" | base64 | tr -d '\n')"
export AZURE_CLIENT_SECRET_B64="$(echo -n "$AZURE_CLIENT_SECRET" | base64 | tr -d '\n')"
export AZURE_CLUSTER_IDENTITY_SECRET_NAME="cluster-identity-secret"
export CLUSTER_IDENTITY_NAME="cluster-identity"
export AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE="default"
kubectl create secret generic "${AZURE_CLUSTER_IDENTITY_SECRET_NAME}" --from-literal=clientSecret="${AZURE_CLIENT_SECRET}" --namespace "${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE}"
clusterctl init --infrastructure azure
export AZURE_LOCATION="eastus"
export AZURE_CONTROL_PLANE_MACHINE_TYPE="Standard_D2s_v3"
export AZURE_NODE_MACHINE_TYPE="Standard_D2s_v3"
export AZURE_RESOURCE_GROUP="<ResourceGroupName>"
clusterctl generate cluster capi-quickstart \
  --kubernetes-version v1.29.1 \
  --control-plane-machine-count=1 \
  --worker-machine-count=1 \
  > capi-quickstart.yaml
kubectl apply -f capi-quickstart.yaml
clusterctl get kubeconfig capi-quickstart > capi-quickstart.kubeconfig

Then in workload cluster

helm install --kubeconfig=./capi-quickstart.kubeconfig --repo https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo cloud-provider-azure --generate-name --set infra.clusterName=capi-quickstart --set cloudControllerManager.clusterCIDR="192.168.0.0/16"

Install Calico as CNI

kubectl --kubeconfig=./capi-quickstart.kubeconfig \
  apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/calico.yaml

Install Ingress-Nginx using helm

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx --namespace nginx --create-namespace

Anything else we need to know?:

Environment:

nilo19 commented 1 week ago

This is not a question to cloud provider azure as you mentioned the service is ready, which means cloud-provider-azure finishes its job.