1.glusterfsPV.yaml
1.1 endpoint. yaml
apiVersion: v1
kind: Endpoints
metadata: ------------------------------------
name: glusterfs ----------------------------
namespace: default -------------------------
subsets: -------------------------------------
- addresses: ---------------------------------
- ip: 10.0.0.14
- ip: 10.0.0.15
- ip: 10.0.0.16
ports: -------------------------------------
- port: 49152
protocol: TCP
1.2 glusterfs server. yaml
apiVersion: v1
kind: Service
metadata:
name: glusterfs
namespace: default
spec:
ports:
- port: 49152
protocol: TCP
targetPort: 49152
sessionAffinity: None ----------------------
type: ClusterIP
2.PV.yaml
apiVersion: v1
kind: PersistentVolume
metadata: -------------------------------------
name: tomcat-mysql --------------------------
labels: -------------------------------------
xxx: xxx
spec: -----------------------------------------
capacity: -----------------------------------
storage: 10Gi
accessModes: --------------------------------
- ReadWriteMany
persistentVolumeReclaimPolicy: Recycle ------
=========================================================================================
nfs: ---------------------------------------
path: "/data/tomcat" ----------------------
server: 172.16.20.101 ---------------------
readOnly: false ---------------------------
========