Centos7 部署Skywalking(Kubernetes)
Posted 张志翔 ̮
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos7 部署Skywalking(Kubernetes)相关的知识,希望对你有一定的参考价值。
最近项目中通过Kubernetes部署Skywalking完成链路日志采集和展示,特此记录便于日后查阅。
一、Grafana部署
1、skywalking-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
spec:
containers:
- name: oap
image: apache/skywalking-oap-server:8.7.0-es7
env:
- name: TZ
value: Asia/Shanghai
- name: SW_STORAGE
value: elasticsearch7
- name: SW_STORAGE_ES_CLUSTER_NODES
value: 10.0.61.24:9200
- name: SW_ES_USER
value: elastic
- name: SW_ES_PASSWORD
value: xxx
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
nodePort: 31280
- port: 11800
name: grpc
nodePort: 31180
#type: ClusterIP
type: NodePort
selector:
app: oap
2、skywalking-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
spec:
containers:
- name: ui
image: apache/skywalking-ui:8.7.0
ports:
- containerPort: 8080
name: page
env:
- name: TZ
value: Asia/Shanghai
- 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: 31234
type: NodePort
selector:
app: ui
到此Centos7 部署Skywalking(Kubernetes)介绍完成。
以上是关于Centos7 部署Skywalking(Kubernetes)的主要内容,如果未能解决你的问题,请参考以下文章