k8s pod文件浏览器

受kuboard pod文件浏览器启发,基于client-go+websocket+vue+xtrmjs实现一个简易的pod可视化界面,可方便操作pod的文件数据,主要实现了:

1.分页+pod名称正则匹配查询

2.pod shell远程终端

3.文件浏览器,支持文件/文件夹上传下载等操作

4.容器日志查询

镜像:yishenqing/podfileview:2.0 支持arm amd64

部署yaml:

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: podfileview
rules:
  - apiGroups:
      - ""
    resources:
      - nodes
      - pods
      - pods/exec
      - pods/log
      - persistentvolumeclaims
      - persistentvolumes
      - namespaces
    verbs:
      - "*"
  - apiGroups:
      - "apps"
    resources:
      - deployments
    verbs:
      - "*"

---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: podfileview
  namespace: default

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: podfileview
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: podfileview
subjects:
  - kind: ServiceAccount
    name: podfileview
    namespace: default

---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: podfileview
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: podfileview
  template:
    metadata:
      labels:
        app: podfileview
    spec:
      serviceAccount: podfileview
      containers:
        - name: podfileview
          image: yishenqing/podfileview:2.0
          env:
            - name: PODFILES_RELEASE
              value: pro
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
              protocol: TCP
---
kind: Service
apiVersion: v1
metadata:
  name: podfileview
  namespace: default
spec:
  type: NodePort
  ports:
    - port: 8080
      targetPort: 8080
      protocol: TCP
      nodePort: 32080
  selector:
    app: podfileview

部分功能展示:

  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值