1.运用helm创建图表
helm create <name>
2.编写 values.yaml 配置文件
cd <name>
vim values.yaml
namespace: vcs
replicaCount: 1
resources:
limits:
cpu: 4
memory: 4Gi
requests:
cpu: 2
memory: 4Gi
image:
repository: "镜像地址"
tag: "版本号"
pullPolicy: Always
service:
name: api-server
port: 8088
targetPort: 8088
nodePort: 32090
protocol: TCP
type: NodePort
volumeMounts:
name_springboot_conf: springboot-conf
mountPath: /config
volumes:
name_springboot_conf: springboot-conf
hostPath:
path: /home/api-server/conf
3.编写 deployment.yaml 配置文件
apiVersion: apps/v1
kind: Deployment
metadata:
name: {
{
.Release.Name}}
namespace: {
{
.Values.namespace}}
spec:
replicas: