• k8s集群配置搭建skywalking


    k8s集群配置搭建skywalking,依赖nacos及es7采用deployment资源,下面上配置

    一、configmap资源

    apiVersion: v1
    data:
      CLUSTER: nacos
      SERVICE_NAME: test_oap
      CLUSTER_NACOS_HOST_PORT: 10.1.2.76:8848
      CLUSTER_NACOS_NAMESPACE: skywalking
      CLUSTER_NACOS_USERNAME: nacos
      CLUSTER_NACOS_PASSWORD: nacos
      CONFIG_NACOS_SERVER_ADDR: 10.1.2.76
      CONFIG_NACOS_SERVER_PORT: 8848
      CONFIG_NACOS_USERNAME: nacos
      CONFIG_NACOS_PASSWORD: nacos
      CORE_GRPC_PORT: "11800"
      CORE_REST_PORT: "12800"
      STORAGE: elasticsearch
      STORAGE_ES_CLUSTER_NODES: vpc-skywalking-es01-.ap-southeast-1.es.amazonaws.com:443
      STORAGE_ES_HTTP_PROTOCOL: https
      CONFIGURATION: nacos
    kind: ConfigMap
    metadata:
      name: skywalking-config
      namespace: default
    configmap.yaml

    二、service资源

    apiVersion: v1
    kind: Service
    metadata:
      labels:
        app: uplive-skywalking
      name: uplive-skywalking
      namespace: default
    spec:
      ports:
      - name: http
        port: 12800
        protocol: TCP
        targetPort: 12800
      - name: grpc
        port: 11800
        protocol: TCP
        targetPort: 11800
      selector:
        app: uplive-skywalking
      type: ClusterIP
    
    ---
    apiVersion: v1
    kind: Service
    metadata:
      labels:
        app: uplive-skywalking-ui
      name: uplive-skywalking-ui
      namespace: default
    spec:
      ports:
      - name: http
        port: 8080
        protocol: TCP
        targetPort: 8080
      selector:
        app: uplive-skywalking-ui
      type: ClusterIP
    service.yaml

    三、deployment资源

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: uplive-skywalking-ui
      name: uplive-skywalking-ui
      namespace: default
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: uplive-skywalking-ui
      strategy:
        rollingUpdate:
          maxSurge: 25%
          maxUnavailable: 25%
        type: RollingUpdate
      template:
        metadata:
          labels:
            app: uplive-skywalking-ui
        spec:
          containers:
          - env:
            - name: SW_OAP_ADDRESS
              value: uplive-skywalking:12800
            image: apache/skywalking-ui:8.8.1
            imagePullPolicy: IfNotPresent
            name: skywalking-ui
            ports:
            - containerPort: 8080
              name: http
              protocol: TCP
            resources:
              limits:
                cpu: "2"
                memory: 1Gi
              requests:
                cpu: "1"
                memory: 1Gi
            volumeMounts:
            - mountPath: /etc/localtime
              name: volume-localtimeGG
          dnsConfig:
            nameservers:
            - 169.254.20.10
            - 172.20.0.10
          dnsPolicy: None
          dnsPolicy: ClusterFirst
          restartPolicy: Always
          terminationGracePeriodSeconds: 30
          volumes:
          - hostPath:
              path: /etc/localtime
              type: ""
            name: volume-localtime
    skywalking-ui.yaml
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      labels:
        app: uplive-skywalking
      name: uplive-skywalking
      namespace: default
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: uplive-skywalking
      template:
        metadata:
          labels:
            app: uplive-skywalking
        spec:
          containers:
          - envFrom:
            - configMapRef:
                name: skywalking-config
              prefix: SW_
            image: apache/skywalking-oap-server:8.8.1
            imagePullPolicy: IfNotPresent
            name: skywalking
            ports:
            - containerPort: 12800
              name: http
              protocol: TCP
            - containerPort: 11800
              name: grpc
              protocol: TCP
            resources:
              limits:
                cpu: 500m
                memory: 3Gi
              requests:
                cpu: 500m
                memory: 3Gi
            volumeMounts:
            - mountPath: /etc/localtime
              name: volume-localtime
          dnsConfig:
            nameservers:
            - 169.254.20.10
            - 172.20.0.10
          dnsPolicy: None
          restartPolicy: Always
          terminationGracePeriodSeconds: 30
          volumes:
          - hostPath:
              path: /etc/localtime
              type: ""
            name: volume-localtime
    skywalking.yaml
  • 相关阅读:
    BZOJ4238:电压
    BZOJ4566:[HAOI2016]找相同字符
    BZOJ4530:[BJOI2014]大融合
    BZOJ1912:[APIO2010]patrol巡逻
    BZOJ3998:[TJOI2015]弦论
    CNBlogs 样式修改
    POJ-3321 Apple Tree 【DFS序+树状数组】
    BZOJ-2152 聪聪可可 【点分治】
    POJ-1741 Tree 【点分治】
    Treap实现名次树
  • 原文地址:https://www.cnblogs.com/caibao666/p/15754109.html
Copyright © 2020-2023  润新知