values 片段
replicaCount: 3
image:
repository: example/app
tag: v1.2.0
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 200m
memory: 256Mi
部署命令
helm repo add example https://charts.example.com
helm upgrade --install web example/web -f values.yaml -n default
分环境覆盖
helm upgrade --install web example/web -f values.yaml -f values.prod.yaml -n default
验证
kubectl get deploy,svc查看副本与服务端口- 通过事件与日志确认滚动更新与启动健康
总结
借助分环境 values 组合,可在保持一致性的同时灵活调整资源与镜像版本。

发表评论 取消回复