K8S 搭建 Pinpoint (五、配置collector )


配置 pinpoint-collector

mkdir -p /data/yaml/pinpoint/pinpoint-collector
cd /data/yaml/pinpoint/pinpoint-collector

cat deployment.yaml 
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: pinpoint
  name: pinpoint-collector
  labels:
    app: pinpoint-collector
spec:
  replicas: 1
  minReadySeconds: 120
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      app: pinpoint-collector
  template:
    metadata:
      labels:
        app: pinpoint-collector
    spec:
      imagePullSecrets:
      - name: harbor
      terminationGracePeriodSeconds: 60
      hostname: pinpoint-collector
      containers:
      - name: pinpoint-collector
        image: harbor.junengcloud.com/pinpoint/pinpoint-collector:2.1.0
        resources:
          requests:
            cpu: 200m
            memory: 307Mi
          limits:
            cpu: 3000m
            memory: 4Gi
        ports:
        - containerPort: 9994
          name: httpa
        - containerPort: 9992
          name: httpb
        - containerPort: 9993
          name: httpc
        - containerPort: 9994
          name: httpd
        - containerPort: 9995
          name: httpe
        - containerPort: 9996
          name: httpf
        - containerPort: 9995
          protocol: UDP
          name: httpg
        - containerPort: 9996
          protocol: UDP
          name: httph
        livenessProbe:
          tcpSocket:
            port: 9991
          initialDelaySeconds: 60
          periodSeconds: 180
        env:
        - name: CLUSTER_ENABLE
          value: "true"
        - name: FLINK_CLUSTER_ENABLE
          value: "true"
        - name: FLINK_CLUSTER_ZOOKEEPER_ADDRESS
          value: "zoo1"
        - name: PINPOINT_ZOOKEEPER_ADDRESS
          value: "zoo1"
        - name: SPRING_PROFILES_ACTIVE
          value: "release"
        - name: HBASE_CLIENT_HOST
          value: "zoo1"
        - name: HBASE_HOST
          value: "zoo1"
        - name: HBASE_PORT
          value: "2181"
        - name: COLLECTOR_RECEIVER_GRPC_SPAN_WORKER_EXECUTOR_THREAD_SIZE
          value: "256"

cat svc.yaml 
apiVersion: v1
kind: Service
metadata:
  namespace: pinpoint
  labels:
    app: pinpoint-collector
  name: pinpoint-collector
spec:
  ports:
  - name: httpa
    port: 9991
    targetPort: 9991
    nodePort: 30091
  - name: httpb
    port: 9992
    targetPort: 9992
    nodePort: 30092
  - name: httpc
    port: 9993
    targetPort: 9993
    nodePort: 30093
  - name: httpd
    port: 9994
    targetPort: 9994
    nodePort: 30094
  - name: httpe
    port: 9995
    targetPort: 9995
    nodePort: 30095
  - name: httpf
    port: 9996
    targetPort: 9996
    nodePort: 30096
  - name: httpg
    port: 9995
    protocol: UDP
    targetPort: 30095
  - name: httph
    port: 9996
    protocol: UDP
    targetPort: 30096
  selector:
    app: pinpoint-collector
  type: NodePort

kubectl apply -f deployment.yaml
kubectl apply -f svc.yaml


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM