Files
go-sms-V2/scripts/kind-dev.yaml
T

21 lines
695 B
YAML

# 本地 kind Dev 集群配置(Day 3)
# 用途:在开发机 Docker 内模拟 go-sms-dev K8s 环境(生产为运维托管集群)。
# 创建:kind create cluster --config scripts/kind-dev.yaml
# 销毁:kind delete cluster --name go-sms-dev
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: go-sms-dev
networking:
apiServerAddress: "127.0.0.1"
# apiServerPort 随机分配,避免与其他服务冲突
nodes:
- role: control-plane
# 将 gateway NodePort 映射到宿主机,便于本地验证(Day 4 的 /health)
extraPortMappings:
- containerPort: 30080
hostPort: 30080
protocol: TCP
- containerPort: 30790
hostPort: 30790
protocol: TCP