首页 > 作文

5.kubernetes的GUI资源管理插件

更新时间:2023-04-03 21:54:43 阅读: 评论:0

目录

1.准备dashboard镜像

[root@hdss7-200 harbor]# docker pull k8scn/kubernetes-dashboard-amd64:v1.8.3[root@hdss7-200 harbor]# docker images|grep dashboard[root@hdss7-200 harbor]# docker tag fcac9aa03fd6  harbor.od.com/public/dashboard:v1.8.3[root@hdss7-200 harbor]# docker push harbor.od.com/public/dashboard:v1.8.3

2.创建资源配置清单

在hdss7-200.host.com上

[root@hdss7-200 harbor]# mkdir -p /data/k8s-yaml/dashboard && cd /data/k8s-yaml/dashboard

rbac.yaml

apiversion: v1kind: rviceaccountmetadata:  labels:    k8s-app: kubernetes-dashboard    addonmanager.kubernetes.io/mode: reconcile  name: kubernetes-dashboard-admin  namespace: kube-system---apiversion: rbac.authorization.k8s.io/v1kind: clusterrolebindingmetadata:  name: kubernetes-dashboard-admin  namespace: kube-system  labels:    k8s-app: kubernetes-dashboard    addonmanager.kubernetes.io/mode: reconcileroleref:  apigroup: rbac.authorization.k8s.io  kind: clusterrole  name: cluster-adminsubjects:- kind: rviceaccount  name: kubernetes-dashboard-admin  namespace: kube-system

常染色体显性遗传病dp.yaml

  apiversion: apps/v1kind: deploymentmetadata:  name: kubernetes-dashboard  namespace: kube-system  labels:    k8s-app: kubernetes-dashboard    kubernetes.io/cluster-rvice: "true"    addonmanager.kubernetes.io/mode: reconcilespec:  lector:    matchlabels:      k8s-app: kubernetes-dashboard  template:    metadata:      labels:        k8s-app: kubernetes-dashboard      annotations:        scheduler.alpha.kubernetes.io/critical-pod: ''    spec:      priorityclassname: system-cluster-critical      containers:      - name: kubernetes-dashboard        image: harbor.od.com/public/dashboard:v1.8.3        resources:          limits:            cpu: 100m            memory: 300mi          requests:            cpu: 50m            memory: 100mi        ports:        - containerport: 8443          protocol: tcp        args:          # platform-specific args here          - --auto-generate-certificates        volumemounts:        - name: tmp-volume          mountpath: /tmp        livenessprobe:          httpget:            scheme: https            path: /            port: 8443          initialdelayconds: 30          timeoutconds: 30      volumes:      - name: tmp-volume        emptydir: {}      rviceaccountname: kubernetes-dashboard-admin      tolerations:      - key: "criticaladdonsonly"        operator: "exists"

svc.yaml

   apiversion: v1kind: rvicemetadata:  name: kubernetes-dashboardboot设置  namespace: kube-system  labels:    k8s-app: kubernetes-dashboard    kubernetes.io/cluster-rvice: "true"    addonmanager.kubernetes.io/mode: reconcilespec:  lector:    k8s-app: kubernetes-dashboard  ports:  - port: 443    targetport: 8443

ingress.yaml

apiversion: extensions/v1beta1kind: ingressmetadata:  name: kubernetes-dashboard  namespace: kube-system  annotations:    kubernetes.io/ingress.class: traefikspec:  rules:  - host: dashboard.od.com    http:      paths:      - backend:          rvicename: kubernetes-dashboard          rviceport: 443 

3.应用资源配置清单

[root@hdss7-21 containers勤奋好学的诗句]# kubectl apply -f http://k8s-yaml.od.com/dashboard/rbac.yaml[root@hdss7-21 containers]# kubectl apply -f http://k8s-yaml.od.com/dashboard/dp.yaml[root@hdss7-21 containers]# kubectl apply -f http://k8s-yaml.od.com/dashboard/svc.yaml[root@hdss7-21 containers]# kubectl apply -f http://k8s-yaml.od.com/dashboard/ingress.yaml

4.查看创建的资源

[root@hdss7-21 containers]# kubectl get pods -n kube-system巨虫公园[root@hdss7-21 containers]# kubectl get svc -n kube-system[root@hdss7-21 containers]# kubectl get ingress -n kube-system

5.解析域名

[root@hdss7-11 conf.d]# vi /var/named/od.com.zone$origin od.com.$ttl 600        ; 10 minutes@               in soa  dns.od.com. dnsadmin.od.com. (                                2020042602 ; rial            //前滚一个序列号                                10800      ; refresh (3 hours)                                900        ; retry (15 minutes)                                604800     ; expire (1 week)                                86400      ; minimum (1 day)                                )                                ns   dns.od.com.$ttl 60 ; 1 minutedns                a    10.4.7.11harbor             a    10.4.7.200k8s-yaml           a    10.4.7.200traefik恍然大悟的意思是什么            a    10.4.7.10dashboard          a    10.4.7.10[root@hdss7-11 conf.d]# systemctl restart named

6.浏览器访问

http://dashboard.od.com/

7.令牌命令行获取方式

 kubectl get cret -n kube-system kubectl describe cret kubernetes-dashboard-admin-token-xxxxx -n kube-system

本文发布于:2023-04-03 21:54:20,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/3d129de8312134436354a6ce4a7e5dcd.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:5.kubernetes的GUI资源管理插件.doc

本文 PDF 下载地址:5.kubernetes的GUI资源管理插件.pdf

标签:资源配置   清单   遗传病   显性
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图