将微服务部署到Kubernetes
1. 部署准备
1.1 Helm命令更新依赖并查看模板
首先,我们使用以下命令更新网关组件的依赖并查看服务模板:
helm dependency update components/gateway
helm template components/gateway -s templates/service.yaml
期望的 helm template 命令输出如下:
---
# Source: gateway/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: gateway
labels:
app.kubernetes.io/name: gateway
helm.sh/chart: gateway-1.0.0
app.kubernetes.io/managed-by: Helm
spec:
type: NodePort
ports:
- nodePort: 30443
port: 443
targetPort: 8443
selector:
app.kubernetes.io/name: gateway
1.2 部署模板介绍
部署模板用于渲染Deployment清单,这是最复杂的模板,因为它必须处理Deployme
超级会员免费看
订阅专栏 解锁全文
39

被折叠的 条评论
为什么被折叠?



