uifd/ui-for-docker是docker的web可视化工具。请问部署在k3s中,yaml文件如何写?
答案2022-12-21:
yaml如下:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ui-for-docker
name: ui-for-docker
namespace: moonfdd
spec:
replicas: 1
selector:
matchLabels:
app: ui-for-docker
template:
metadata:
labels:
app: ui-for-docker
spec:
containers:
- image: uifd/ui-for-docker
imagePullPolicy: IfNotPresent
name: ui-for-docker
volumeMounts:
- mountPath: /var/run/docker.sock
name: volv
volumes:
- hostPath:
path: /var/run/docker.sock
type: Socket
name: volv
---
apiVersion: v1
kind: Service
metadata:
labels:
app: ui-for-docker
name: ui-for-docker
namespace: moonfdd
spec:
ports:
- port: 9000
protocol: TCP
targetPort: 9000
selector:
app: ui-for-docker
type: NodePort