00:00:00
加载中...
K8S常见的微服务中间件部署之sentinel 
本文最后更新于153 天前,其中的信息可能已经过时,如有错误请发送邮件到big_fw@foxmail.com

一.部署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.部署服务

[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

如上图所示,我们可以输入默认的用户名密码"sentinel",来登录WebUI。

2.登录sentinel的WebUI

如上图所示,登录成功后,我们就可以在sentinel来进行操作啦~
文末附加内容
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇