--- apiVersion: apps/v1 kind: Deployment metadata: labels: name: pushgateway name: pushgateway namespace: kube-public spec: progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 7 selector: matchLabels: app: pushgateway strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 0 type: RollingUpdate template: metadata: labels: app: pushgateway spec: containers: - name: pushgateway image: registry.cn-hangzhou.aliyuncs.com/zhengyu1992/pushgateway:1.6.2 #image: harbor.uenpay.com/base/pushgateway:1.6.2 imagePullPolicy: IfNotPresent ports: - containerPort: 9091 protocol: TCP resources: limits: cpu: '500m' memory: 500Mi requests: cpu: 100m memory: 100Mi restartPolicy: Always terminationGracePeriodSeconds: 30 tolerations: - key: prometheus effect: NoSchedule operator: Exists --- apiVersion: v1 kind: Service metadata: name: pushgateway namespace: kube-public spec: ports: - port: 9091 protocol: TCP targetPort: 9091 selector: app: pushgateway type: ClusterIP