常用配置
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
kind: Service apiVersion: v1 metadata: name: fastapiapp labels: app: fastapi spec: selector: app: fastapi ports: - protocol: TCP port: 80 targetPort: 7500 type: NodePort --- apiVersion: apps/v1 kind: Deployment metadata: name: fastapiapp labels: app: fastapi spec: replicas: 8 selector: matchLabels: app: fastapi strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 template: metadata: labels: app: fastapi annotations: dapr.io/enabled: "true" dapr.io/app-id: "fastapiapp" dapr.io/app-port: "7500" spec: containers: - name: fastapi image: lishichao1181/dapr_demo:v1.0.4 ports: - containerPort: 7500 imagePullPolicy: Always readinessProbe: httpGet: path: healthz port: 7500 initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds : 5 failureThreshold : 3 env: - name: TZ value: "Asia/Shanghai"模版
标签:资源配置,name,模版,app,labels,dapr,7500,fastapi,k8s From: https://www.cnblogs.com/root0/p/16840836.html