认识
官网:https://bitnami.com/
文档:https://github.com/bitnami/charts/blob/main/bitnami/nginx/README.md
仓库:https://github.com/bitnami/charts/tree/main/bitnami/nginx
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads. 简而言之,该 Helm Chart 用于在 Kuberntes 中部署 Nginx 服务。
构建
容器镜像:https://hub.docker.com/r/bitnami/nginx
[I] DST: ccr.ccs.tencentyun.com/d3rm-3rd/docker.io_bitnami_nginx:1.29.1-debian-12-r0
[I] CLD: d3rm-3rd/docker.io_bitnami_nginx
helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update bitnami helm search repo bitnami/ | grep nginx helm pull bitnami/nginx helm show values ./nginx-21.1.23.tgz > nginx-21.1.23.tgz.helm-values.yaml vim nginx-21.1.23.tgz.helm-values.yaml ...
应用
转发内网的云服务
- 该类服务例如 AWS ElasticCache Redis OSS 未支持公网访问,需要其他方式进行暴露。
- 某些云服务公网带宽价格昂贵
在 Kubernetes Cluster 中,我们通过该 Helm Chart 转发内网中的云服务,例如,RDS MySQL、Elasticsearch、Redis、……
.service.annotations: // 绑定 LB 实例、绑定访问域名、……
.containerPorts.http: null // 关闭默认 80 端口;
.containerPorts.https: null // 关闭默认 443 端口;
.streamServerBlock: “” // 配置被转发的服务
.extraContainerPorts: [] // 配置被转发的服务
.service.extraPorts: [] // 配置被转发的服务