apiVersion: apps/v1 kind: Deployment metadata: name: fengling-gateway namespace: fengling-test labels: app: fengling-gateway version: v2 spec: replicas: 1 selector: matchLabels: app: fengling-gateway template: metadata: labels: app: fengling-gateway version: v2 spec: containers: - name: gateway image: 192.168.100.120:8418/fengling/fengling-gateway:test imagePullPolicy: Always ports: - containerPort: 8080 name: http protocol: TCP env: - name: ASPNETCORE_ENVIRONMENT value: "Production" - name: ASPNETCORE_URLS value: "http://+:8080" envFrom: - configMapRef: name: fengling-gateway-config - secretRef: name: fengling-gateway-secret livenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3 resources: requests: cpu: 200m memory: 256Mi limits: cpu: 1000m memory: 512Mi --- apiVersion: v1 kind: Service metadata: name: fengling-gateway namespace: fengling-test labels: app: fengling-gateway spec: type: ClusterIP selector: app: fengling-gateway ports: - port: 80 targetPort: 8080 name: http - port: 8081 targetPort: 8081 name: management