k8s glusterfs mysql_k8s使用glusterfs

glusterfs-endpoints.json

{

"kind": "Endpoints",

"apiVersion": "v1",

"metadata": {

"name": "glusterfs-cluster",

"namespace": "app-bi"

},

"subsets": [

{

"addresses": [

{

"ip": "100.20.111.145"

}

],

"ports": [

{

"port": 2990

}

]

},

{

"addresses": [

{

"ip": "1o0.20.111.146"

}

],

"ports": [

{

"port": 2990

}

]

},

{

"addresses": [

{

"ip": "100.20.111.148"

}

],

"ports": [

{

"port": 2990

}

]

}

]

}

kubectl create -f glusterfs-endpoints.json

glusterfs-service.json

{

"kind": "Service",

"apiVersion": "v1",

"metadata": {

"name": "glusterfs-cluster",

"namespace": "app-bi"

},

"spec": {

"ports": [

{"port": 2990}

]

}

}

kubectl create -f glusterfs-service.json

app-server-data-pv.yaml

apiVersion: v1

kind: PersistentVolume

metadata:

name: pv-app-server-data

namespace: app-bi

spec:

capacity:

storage: 5Gi

accessModes:

- ReadWriteMany

glusterfs:

endpoints: glusterfs-cluster

path: app-server-data

readOnly: false

kubectl create -f app-server-data-pv.yaml

标签:2990,app,json,glusterfs,使用,k8s,data,port

来源: https://www.cnblogs.com/lingfenglian/p/11753938.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值