业务使用的consul需要开启ACL,记录一下helm如何开启ACL。并且获取Token登录

配置的存储大小不生效,默认是10Gi

global:
  name: consul
  acls:
    manageSystemACLs: true

datacenter: dc1

ui:
  enabled: true
  service:
    type: ClusterIP

server:
  replicas: 3
  bootstrapExpect: 3
  disruptionBudget:
    enabled: true
    maxUnavailable: 0
  dataStorage:
    enabled: true
    size: 20Gi

client:
  enabled: true

connectInject:
  enabled: true

controller:
  enabled: true

安装会比较慢,过程中acl容器需要等待server容器Runing后才可以注入acl,acl容器初始化后会自动删除

helm repo add hashicorp https://helm.releases.hashicorp.com
helm search repo hashicorp/consul
helm install consul hashicorp/consul -f consul-values.yaml --namespace consul

开启acl以后web界面是需要token登录的,直接用这个token登录

kubectl get secret consul-bootstrap-acl-token -n consul -o jsonpath="{.data.token}" | base64 --decode; echo

更多推荐