「NACOS」- Helm Chart | 官方 | Official Helm Chart

on Kubernetes | with Helm Chart | 3.0.0

架构调整,容器需要暴露 8080 端口,来提供 UI 访问。06/19/2025

Helm Chart 2.1.7 | Nacos 2.4.0

官网:https://artifacthub.io/packages/helm/ygqygq2/nacos
仓库:https://github.com/ygqygq2/charts

Helm Chart version 2.1.7

组成

mysql.enabled: false | 我们使用独立的数据库服务,所以关闭该字段。
mysql.external: … | 配置我们的数据库信息
mysqlSlaveHost, mysqlSlavePort | 针对我们的部署环境,我们并无从库,所以我们将该字段置空。

通过 service.ports 参数,添加 grpc-xxx 来暴露 gRPC 端口。

replicaCount: 3 // 其能够指定节点数,单个节点也能够运行。

构建

helm repo add ygqygq2 https://ygqygq2.github.io/charts/
helm repo update

helm pull ygqygq2/nacos --version 2.1.7

Cluster Mode

应用

helm repo add ygqygq2 https://ygqygq2.github.io/charts/
helm repo update

helm pull ygqygq2/nacos --version 2.1.7

helm show values ./nacos-2.1.7.tgz > nacos-2.1.7.tgz.helm-values.yaml
vim nacos-2.1.7.tgz.helm-values.yaml
... nameOverride: nacos
... fullnameOverride: nacos
... image:
... global.storageClass:
... mysql.enabled: false
... mysql.external:
... statefulset.enable: true
... service.ports.grpc.port: 9848
... service.ports.grpc.protocol: TCP
... ingress.enabled:
... ingress.ingressClassName:
... ingress.hostname:
... ingress.annotations:
... ingress.tls: true // 其将生成针对 hostname 的 TLS 配置

helm upgrade --install nacos ./nacos-2.1.7.tgz -f nacos-2.1.7.tgz.helm-values.yaml

暴露 gRPC 端口 | https://nacos.io/en-us/docs/v2/upgrading/2.0.0-compatibility.html

...
service:
  ...
  ports:
    ...
    grpc:
      port: 9848
      protocol: TCP
...