91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

prometheus08-k8s部署prometheus

發布時間:2020-06-14 21:43:28 來源:網絡 閱讀:1024 作者:小小三郎1 欄目:系統運維

1.基礎環境有k8s集群

[root@kubemaster01?prometheus]#?kubectl??get?node?
NAME?????????????STATUS???ROLES????AGE???VERSION
192.168.249.51???Ready????<none>???63d???v1.12.3
192.168.249.52???Ready????<none>???63d???v1.12.3
192.168.249.53???Ready????<none>???63d???v1.12.3
You?have?new?mail?in?/var/spool/mail/root
[root@kubemaster01?prometheus]#?kubectl??get?cs
NAME?????????????????STATUS????MESSAGE?????????????ERROR
scheduler????????????Healthy???ok??????????????????
controller-manager???Healthy???ok??????????????????
etcd-1???????????????Healthy???{"health":"true"}???
etcd-2???????????????Healthy???{"health":"true"}???
etcd-0???????????????Healthy???{"health":"true"}???
[root@kubemaster01?prometheus]#

2.下載prometheus yaml

for?file?in??prometheus-configmap.yaml?prometheus-rbac.yaml?prometheus-service.yaml?prometheus-statefulset.yaml?;do?wget?https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/addons/prometheus/$file;done

3.設置動態storageclass

?3.1.kubectl apply? -f rbac.yml

kind:?ServiceAccount
apiVersion:?v1
metadata:
??name:?nfs-client-provisioner
---
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
????namespace:?default
roleRef:
??kind:?ClusterRole
??name:?nfs-client-provisioner-runner
??apiGroup:?rbac.authorization.k8s.io
---
kind:?Role
apiVersion:?rbac.authorization.k8s.io/v1
metadata:
??name:?leader-locking-nfs-client-provisioner
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
????namespace:?default
roleRef:
??kind:?Role
??name:?leader-locking-nfs-client-provisioner
??apiGroup:?rbac.authorization.k8s.io

3.2 設置存儲deployment.yaml

apiVersion:?v1
kind:?ServiceAccount
metadata:
??name:?nfs-client-provisioner
---
kind:?Deployment
apiVersion:?apps/v1
metadata:
??name:?nfs-client-provisioner
spec:
??replicas:?1
??selector:
????matchLabels:
??????app:?nfs-client-provisioner
??strategy:
????type:?Recreate
??template:
????metadata:
??????labels:
????????app:?nfs-client-provisioner
????spec:
??????serviceAccountName:?nfs-client-provisioner
??????containers:
????????-?name:?nfs-client-provisioner
??????????image:?quay.io/external_storage/nfs-client-provisioner:latest
??????????volumeMounts:
????????????-?name:?nfs-client-root
??????????????mountPath:?/persistentvolumes
??????????env:
????????????-?name:?PROVISIONER_NAME
??????????????value:?fuseim.pri/ifs
????????????-?name:?NFS_SERVER
??????????????value:?192.168.249.54
????????????-?name:?NFS_PATH
??????????????value:?/data/k8s/prometheus
??????volumes:
????????-?name:?nfs-client-root
??????????nfs:
????????????server:?192.168.249.54
????????????path:?/data/k8s/prometheus

3.4? kubectl apply? -f class.yaml

apiVersion:?storage.k8s.io/v1
kind:?StorageClass
metadata:
??name:?managed-nfs-storage
provisioner:?fuseim.pri/ifs?#?or?choose?another?name,?must?match?deployment's?env?PROVISIONER_NAME'
parameters:
??archiveOnDelete:?"false"

3.5 備注說明 nfs 是提前部署好的(ip:192.168.249.54)

[root@es?prometheus]#?cat?/etc/exports
/data/k8s/prometheus??192.168.249.0/24(rw,sync,no_root_squash)
[root@es?prometheus]#

4.修改prometheus的存儲地址(prometheus-statefulset.yaml)

prometheus08-k8s部署prometheus

4.把 prometheus的svc 發布改為nodeport

prometheus08-k8s部署prometheus

5.部署

kubectl? apply -f prometheus-rbac.yaml? ?prometheus-configmap.yaml? prometheus-statefulset.yaml? prometheus-service.yaml

6. 訪問

prometheus08-k8s部署prometheus

7.

prometheus08-k8s部署prometheus

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

应用必备| 团风县| 腾冲县| 金堂县| 历史| 炉霍县| 松潘县| 巴塘县| 红原县| 文山县| 沛县| 麦盖提县| 内江市| 阜宁县| 石河子市| 高州市| 河东区| 南宁市| 邢台市| 金门县| 布尔津县| 大丰市| 休宁县| 楚雄市| 靖边县| 崇礼县| 专栏| 酒泉市| 蓬安县| 吴旗县| 临泽县| 墨竹工卡县| 阜阳市| 呼伦贝尔市| 浮山县| 米林县| 辰溪县| 驻马店市| 徐水县| 古蔺县| 阿拉善左旗|