确保每一个node,加入集群自动运行DaemonSet

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: node-daemon
  labels:
    app: node-daemon
spec:
  selector:
    matchLabels:
      name: node-daemon
  template:
    metadata:
      labels:
        name: node-daemon
    spec:
      containers:
        - name: parsec-client
          image: parsec-client:v1.0
          ports:
            - containerPort: 8300
              hostPort: 8300
          volumeMounts:
            - mountPath: /run/parsec
              name: parsec-run
      volumes:
        - hostPath:
            path: /home/parsec/run
          name: parsec-run

等价于docker命令

sudo docker run --rm -d -p8300:8300 -v /home/parsec/run:/run/parsec parsec-client:v1.0

标签: docker, k3s

添加新评论