Deploying to specific nodes using Helm in AKS

Zac 0 Reputation points
2025-01-11T03:43:42.0733333+00:00

Why doesn't this work? I'd like to install it in the second node but it keeps defaulting to the first.

kubectl get nodes 
NAME                                STATUS   ROLES    AGE   VERSION
aks-agentpool-17677754-vmss000000   Ready    <none>   52m   v1.30.7
aks-agentpool-17677754-vmss000001   Ready    <none>   52m   v1.30.7

helm install test project/chart \
  --create-namespace \
  --namespace test \
  --set nodeSelector."kubernetes\.io/hostname"="aks-agentpool-17677754-vmss000001"
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,224 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Abiola Akinbade 21,780 Reputation points
    2025-01-11T11:58:50.5433333+00:00

    Could try using a values file?

    nodeSelector: kubernetes.io/hostname: aks-agentpool-17677754-vmss000001

    And then install using simlar to:

    
    helm install test project/chart \
      --create-namespace \
      --namespace test \
      -f values.yaml
    

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.