Merge branch 'main' of https://gitea.107421.xyz/zeaslity/CmiiDeploy into main
This commit is contained in:
66
57-202503-鄂尔多斯机场/doris多主机部署/k8s-nfs-rbac.yaml
Normal file
66
57-202503-鄂尔多斯机场/doris多主机部署/k8s-nfs-rbac.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: nfs-client-provisioner
|
||||
# replace with namespace where provisioner is deployed
|
||||
namespace: kube-system #根据实际环境设定namespace,下面类同
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: nfs-client-provisioner-runner
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch", "update"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["create", "update", "patch"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: run-nfs-client-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: nfs-client-provisioner
|
||||
# replace with namespace where provisioner is deployed
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
# name: nfs-client-provisioner-runner
|
||||
name: cluster-admin
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: leader-locking-nfs-client-provisioner
|
||||
# replace with namespace where provisioner is deployed
|
||||
namespace: kube-system
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["endpoints"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: leader-locking-nfs-client-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: nfs-client-provisioner
|
||||
# replace with namespace where provisioner is deployed
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: leader-locking-nfs-client-provisioner
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
145
57-202503-鄂尔多斯机场/doris多主机部署/k8s-nfs-sc-deploy.yaml
Normal file
145
57-202503-鄂尔多斯机场/doris多主机部署/k8s-nfs-sc-deploy.yaml
Normal file
@@ -0,0 +1,145 @@
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: doris-nfs-sc-56
|
||||
provisioner: doris-nfs-sc-56
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: doris-nfs-sc-56
|
||||
labels:
|
||||
app: doris-nfs-sc-56
|
||||
# replace with namespace where provisioner is deployed
|
||||
namespace: kube-system #与RBAC文件中的namespace保持一致
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: doris-nfs-sc-56
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: doris-nfs-sc-56
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harborsecret
|
||||
serviceAccountName: nfs-client-provisioner
|
||||
containers:
|
||||
- name: doris-nfs-sc-56
|
||||
image: 172.16.100.55:8033/cmii/nfs-subdir-external-provisioner:v4.0.2
|
||||
volumeMounts:
|
||||
- name: nfs-client-root
|
||||
mountPath: /persistentvolumes
|
||||
env:
|
||||
- name: PROVISIONER_NAME
|
||||
value: doris-nfs-sc-56
|
||||
- name: NFS_SERVER
|
||||
value: 172.16.100.56
|
||||
- name: NFS_PATH
|
||||
value: /var/lib/docker/nfs_data
|
||||
volumes:
|
||||
- name: nfs-client-root
|
||||
nfs:
|
||||
server: 172.16.100.56
|
||||
path: /var/lib/docker/nfs_data
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: doris-nfs-sc-57
|
||||
provisioner: doris-nfs-sc-57
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: doris-nfs-sc-57
|
||||
labels:
|
||||
app: doris-nfs-sc-57
|
||||
# replace with namespace where provisioner is deployed
|
||||
namespace: kube-system #与RBAC文件中的namespace保持一致
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: doris-nfs-sc-57
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: doris-nfs-sc-57
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harborsecret
|
||||
serviceAccountName: nfs-client-provisioner
|
||||
containers:
|
||||
- name: doris-nfs-sc-57
|
||||
image: 172.16.100.55:8033/cmii/nfs-subdir-external-provisioner:v4.0.2
|
||||
volumeMounts:
|
||||
- name: nfs-client-root
|
||||
mountPath: /persistentvolumes
|
||||
env:
|
||||
- name: PROVISIONER_NAME
|
||||
value: doris-nfs-sc-57
|
||||
- name: NFS_SERVER
|
||||
value: 172.16.100.57
|
||||
- name: NFS_PATH
|
||||
value: /var/lib/docker/nfs_data
|
||||
volumes:
|
||||
- name: nfs-client-root
|
||||
nfs:
|
||||
server: 172.16.100.57
|
||||
path: /var/lib/docker/nfs_data
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: doris-nfs-sc-58
|
||||
provisioner: doris-nfs-sc-58
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: doris-nfs-sc-58
|
||||
labels:
|
||||
app: doris-nfs-sc-58
|
||||
# replace with namespace where provisioner is deployed
|
||||
namespace: kube-system #与RBAC文件中的namespace保持一致
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: doris-nfs-sc-58
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: doris-nfs-sc-58
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harborsecret
|
||||
serviceAccountName: nfs-client-provisioner
|
||||
containers:
|
||||
- name: doris-nfs-sc-58
|
||||
image: 172.16.100.55:8033/cmii/nfs-subdir-external-provisioner:v4.0.2
|
||||
volumeMounts:
|
||||
- name: nfs-client-root
|
||||
mountPath: /persistentvolumes
|
||||
env:
|
||||
- name: PROVISIONER_NAME
|
||||
value: doris-nfs-sc-58
|
||||
- name: NFS_SERVER
|
||||
value: 172.16.100.58
|
||||
- name: NFS_PATH
|
||||
value: /var/lib/docker/nfs_data
|
||||
volumes:
|
||||
- name: nfs-client-root
|
||||
nfs:
|
||||
server: 172.16.100.58
|
||||
path: /var/lib/docker/nfs_data
|
||||
---
|
||||
Reference in New Issue
Block a user