apiVersion: apps/v1 kind: Deployment metadata: name: service-bankname-match labels: app: service-bankname-match spec: replicas: 1 selector: matchLabels: app: service-bankname-match template: metadata: labels: app: service-bankname-match spec: containers: - image: artifactory.dev.cmbc.cn:31345/mlp-docker-sit-local/20230518/service-bankname-match:2000038692v29 name: service-bankname-match imagePullPolicy: "IfNotPresent" lifecycle: preStop: exec: command: - /bin/sh - -c - /java/pset/stop.sh workingDir: /app/service-bankname-match command: ['sh','app/start_server.sh'] ports: - containerPort: 8080 env: - name: MONITOR_TYPE value: CONTAINER_ONLY - name: cmbc_logs_banknamematch value: stdout - name: cmbc_logs_banknamematch_tags value: topic=elk-k8s-mlp-mopen resources: requests: cpu: 1500m memory: "4Gi" limits: cpu: "8" memory: "8Gi" readinessProbe: failureThreshold: 3 httpGet: path: /healthz port: 8080 scheme: HTTP initialDelaySeconds: 60 periodSeconds: 60 timeoutSeconds: 120 livenessProbe: failureThreshold: 3 httpGet: path: /healthz port: 8080 scheme: HTTP initialDelaySeconds: 60 periodSeconds: 60 timeoutSeconds: 120 nodeSelector: app_name: testapp
时间: 2024-04-28 08:23:26 浏览: 179
azure-appservice-static:将静态站点部署到azure AppService
这段代码是一个 Kubernetes 的 Deployment 文件,用于部署一个名为 `service-bankname-match` 的应用。该应用使用的镜像为 `artifactory.dev.cmbc.cn:31345/mlp-docker-sit-local/20230518/service-bankname-match:2000038692v29`,容器监听的端口为 8080。此外,该应用还定义了一些环境变量,资源请求和限制,以及 readiness 和 liveness 探针。最后,该 Deployment 文件还指定了一个 `nodeSelector`,用于将该应用调度到特定的节点上。
阅读全文