K8S部署skywalking9.3版本

安装包等镜像准备

安装包官网下载地址

Documentation | Apache SkyWalking

K8S部署skywalking9.3版本_第1张图片

选择9.3版本下载 

agent选择 8.14版本下载

K8S部署skywalking9.3版本_第2张图片

拉取对应版本镜像

docker pull apache/skywalking-ui:9.3.0

docker pull apache/skywalking-opa-server:9.3.0

 部署

创建namespace

kubectl create namespace skywalking

执行oap.yaml

kubectl apply -f oap.yml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: oap
  namespace: skywalking
spec:
  replicas: 1
  selector:
    matchLabels:
      app: oap
      release: skywalking
  template:
    metadata:
      labels:
        app: oap
        release: skywalking
      containers:
        - name: oap
          image: swr.sc-region-1.sgic.sgcc.com.cn/jnj-cloud/skywalking-oap-server:9.3.0
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 11800
              name: grpc
            - containerPort: 12800
              name: rest
---
apiVersion: v1
kind: Service
metadata:
  name: oap
  namespace: skywalking
  labels:
    service: oap
spec:
  ports:
    - port: 12800
      name: rest
    - port: 11800
      name: grpc
  selector:
    app: oap

创建ui.yml

kubectl apply -f ui.yml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: ui-deployment
  namespace: skywalking
  labels:
    app: ui
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ui
  template:
    metadata:
      labels:
        app: ui
      containers:
        - name: ui
          image: swr.sc-region-1.sgic.sgcc.com.cn/jnj-cloud/skywalking-ui:9.3.0
          ports:
            - containerPort: 8080
              name: page
          env:
            - name: SW_OAP_ADDRESS
              value: http://oap:12800
---
apiVersion: v1
kind: Service
metadata:
  name: ui
  namespace: skywalking
  labels:
    service: ui
spec:
  ports:
    - port: 8080
      name: page
      nodePort: 31008
  type: NodePort
  selector:
    app: ui

登录网页ip:31008,查看网页

K8S部署skywalking9.3版本_第3张图片

如果未展示页面,通过kubectl logs -f 查看OPA和UI,pod的报错日志 

你可能感兴趣的:(centos,linux,运维,skywalking,docker)