How to select specific hosts for consul client in helm kubernetes config

My setup is with 3 masters and 17 worker nodes

Masters - Centos
Workers - Ubuntu

My config:

global:
  name: consul
  datacenter: DC1
  gossipEncryption:
    secretName: 'consul-gossip-encryption-key'
    secretKey: 'key'
  tls:
    enabled: true
    enableAutoEncrypt: true
    verify: true
  acls:
    manageSystemACLs: true
server:
  replicas: 3
  bootstrapExpect: 3
  disruptionBudget:
    enabled: true
    maxUnavailable: 0
  updatePartition:
  securityContext:
    runAsNonRoot: false
    runAsUser: 0
ui:
# Add service Loadbalancer for consul ui to be on a random port. Check in kubernetes services
  service:
    type: "LoadBalancer"
  enabled: true
connectInject:
  enabled: true
controller:
  enabled: true
prometheus:
  enabled: true
grafana:
  enabled: true

3 PV are created.
How to restrict other hosts getting installed with consul-client pods ?

Thanks in advance

You can use taints and tolerations on the worker nodes and then the client.tolerations value to pin the clients to only those nodes.

1 Like