受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
部分功能展示: