apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    sre: api
  name: sre-api
  namespace: sre
spec:
  replicas: 1
  selector:
    matchLabels:
      sre: api
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        sre: api
    spec:
      containers:
        - env:
            - name: TZ
              value: Asia/Shanghai
          image: 'api:20'
          imagePullPolicy: IfNotPresent
          name: sre-api
          ports:
            - containerPort: 80
              name: gin
              protocol: TCP

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code