K8S暴露pod内多个端口

时间:2024-11-17 20:07:40
  • # cat
  • apiVersion: apps/v1
  • kind: Deployment
  • metadata:
  • annotations:
  • /revision: "63"
  • description: video模块
  • labels:
  • k8s-app: nsw-ai-video
  • qcloud-app: nsw-ai-video
  • name: nsw-ai-video
  • namespace: nsyai-test
  • spec:
  • progressDeadlineSeconds: 600
  • replicas: 1
  • revisionHistoryLimit: 10
  • selector:
  • matchLabels:
  • k8s-app: nsw-ai-video
  • qcloud-app: nsw-ai-video
  • template:
  • metadata:
  • labels:
  • k8s-app: nsw-ai-video
  • qcloud-app: nsw-ai-video
  • spec:
  • containers:
  • - name: nsw-ai-video
  • image: 10.0.8.56/nsyai-test/nsw-ai-video:2023-07-28-15-40
  • imagePullPolicy: Always
  • livenessProbe:
  • failureThreshold: 5
  • initialDelaySeconds: 180
  • periodSeconds: 10
  • successThreshold: 1
  • tcpSocket:
  • port: 8080
  • timeoutSeconds: 6
  • readinessProbe:
  • failureThreshold: 5
  • initialDelaySeconds: 60
  • periodSeconds: 10
  • successThreshold: 1
  • tcpSocket:
  • port: 8080
  • timeoutSeconds: 60
  • resources:
  • limits:
  • cpu: 2000m
  • memory: 2Gi
  • requests:
  • cpu: "1"
  • memory: 512Mi
  • ports:
  • - containerPort: 8080
  • name: image-port
  • protocol: TCP
  • - containerPort: 9999
  • name: xxl-job-port
  • protocol: TCP
  • imagePullSecrets:
  • - name: nsw-harbor-secret