K8S常見的微服務(wù)中間件部署之sentinel
作者:尹正杰
版權(quán)聲明:原創(chuàng)作品,謝絕轉(zhuǎn)載!否則將追究法律責(zé)任。
一.部署sentinel
1.編寫資源清單
[root@master241 07-sentinel]# cat 01-deploy-sentinel.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy-sentinel
spec:
replicas: 1
selector:
matchLabels:
apps: sentinel
template:
metadata:
labels:
apps: sentinel
spec:
containers:
- name: sentinel
image: docker.io/herodotus/sentinel-dashboard:v1.8.8
ports:
- containerPort: 8858
name: web
[root@master241 07-sentinel]#
[root@master241 07-sentinel]# cat 02-svc-sentinel.yaml
apiVersion: v1
kind: Service
metadata:
name: svc-sentinel
spec:
ports:
- port: 8858
selector:
apps: sentinel
type: LoadBalancer
[root@master241 07-sentinel]#
2.部署服務(wù)
[root@master241 07-sentinel]# ll
total 16
drwxr-xr-x 2 root root 4096 Jul 14 17:53 ./
drwxr-xr-x 9 root root 4096 Jul 14 16:38 ../
-rw-r--r-- 1 root root 382 Jul 14 17:49 01-deploy-sentinel.yaml
-rw-r--r-- 1 root root 142 Jul 14 17:53 02-svc-sentinel.yaml
[root@master241 07-sentinel]#
[root@master241 07-sentinel]# kubectl apply -f .
deployment.apps/deploy-sentinel created
service/svc-sentinel created
[root@master241 07-sentinel]#
[root@master241 07-sentinel]# kubectl get pods -l apps=sentinel -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
deploy-sentinel-7877d554f-9pmk4 1/1 Running 0 14s 10.100.165.188 worker242 <none> <none>
[root@master241 07-sentinel]#
[root@master241 07-sentinel]# kubectl get svc svc-sentinel
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
svc-sentinel LoadBalancer 10.197.103.252 10.0.0.157 8858:30105/TCP 20s
[root@master241 07-sentinel]#
二.登錄sentinel的WebUI
1.訪問sentinel的WebUI

如上圖所示,我們可以輸入默認(rèn)的用戶名密碼"sentinel",來登錄WebUI。
2.登錄sentinel的WebUI

如上圖所示,登錄成功后,我們就可以在sentinel來進(jìn)行操作啦~
本文來自博客園,作者:尹正杰,轉(zhuǎn)載請(qǐng)注明原文鏈接:http://www.rzrgm.cn/yinzhengjie/p/18988512,個(gè)人微信: "JasonYin2020"(添加時(shí)請(qǐng)備注來源及意圖備注,有償付費(fèi))
當(dāng)你的才華還撐不起你的野心的時(shí)候,你就應(yīng)該靜下心來學(xué)習(xí)。當(dāng)你的能力還駕馭不了你的目標(biāo)的時(shí)候,你就應(yīng)該沉下心來歷練。問問自己,想要怎樣的人生。

浙公網(wǎng)安備 33010602011771號(hào)