dreamhighhd commented on issue #185:
URL: 
https://github.com/apache/rocketmq-exporter/issues/185#issuecomment-5211660928

   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: rocketmq-exporter
     namespace: monitoring
     labels:
       app: rocketmq-exporter
   spec:
     replicas: 1
     selector:
       matchLabels:
         app: rocketmq-exporter
     template:
       metadata:
         labels:
           app: rocketmq-exporter
       spec:
         containers:
         - name: rocketmq-exporter
           image: apache/rocketmq-exporter:0.0.2
           imagePullPolicy: IfNotPresent
           ports:
           - containerPort: 5557
             name: metrics
           env:
           - name: ROCKETMQ_CONFIG_NAMESRVADDR
             value: "rocketmq-nameserver.rocketmq.svc.cluster.local:9876"
           - name: JAVA_OPTS
             value: "-Xms256m -Xmx256m"
           livenessProbe:
             httpGet:
               path: /metrics
               port: 5557
             initialDelaySeconds: 30
             periodSeconds: 15
           readinessProbe:
             httpGet:
               path: /metrics
               port: 5557
             initialDelaySeconds: 20
             periodSeconds: 10
           resources:
             requests:
               cpu: 100m
               memory: 256Mi
             limits:
               cpu: 500m
               memory: 512Mi
         restartPolicy: Always
         #imagePullSecrets: 
         #- name: default-secret
   
   
   ---
   apiVersion: v1
   kind: Service
   metadata:
     name: rocketmq-exporter
     namespace: monitoring
     labels:
       app: rocketmq-exporter
   spec:
     selector:
       app: rocketmq-exporter
     ports:
     - name: metrics
       port: 5557
       targetPort: 5557
     type: ClusterIP
   
   ---
   apiVersion: monitoring.coreos.com/v1
   kind: ServiceMonitor
   metadata:
     name: rocketmq-exporter
     namespace: monitoring
   spec:
     selector:
       matchLabels:
         app: rocketmq-exporter
     namespaceSelector:
       matchNames:
         - monitoring
     endpoints:
       - port: metrics
         interval: 30s
         path: /metrics
   
   可以参考下,我昨天刚部署成功的


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to