mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
增加k8s部署文件
This commit is contained in:
50
deployment/skywalking/skywalking-deployment.yaml
Normal file
50
deployment/skywalking/skywalking-deployment.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
name: skywalking
|
||||
name: skywalking
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: skywalking
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: skywalking
|
||||
spec:
|
||||
containers:
|
||||
- name: skywalking
|
||||
image: apache/skywalking-oap-server
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 11800
|
||||
name: collector
|
||||
- containerPort: 12800
|
||||
name: oap
|
||||
env:
|
||||
- name: SW_STORAGE
|
||||
value: elasticsearch
|
||||
- name: TZ
|
||||
value: Asia/Shanghai
|
||||
- name: SW_STORAGE_ES_CLUSTER_NODES
|
||||
value: elasticsearch:9220
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: skywalking
|
||||
namespace: kube-ruoyi
|
||||
spec:
|
||||
ports:
|
||||
- port: 11800
|
||||
targetPort: 11800
|
||||
name: collector
|
||||
- port: 12800
|
||||
targetPort: 12800
|
||||
name: oap
|
||||
selector:
|
||||
app: skywalking # 该 Service 会将所有具有标签 app: mysql-labels-app暴露到一个抽象的 Service 端口上(targetPort:容器接收流量的端口;port:可任意取值的抽象的 Service 端口,其他 Pod 通过该端口访问 Service
|
||||
type: NodePort
|
||||
Reference in New Issue
Block a user