I want to run docker with k8s, docker command as follow
docker run -d -it --rm \
--mount type=bind,source=/search/odin/mountp,target=/search/odin/mountp,bind-propagation=rshared \
--cap-add SYS_ADMIN --device /dev/fuse --net=host demo:1.1 /bin/bash
As if kubectl
not support --mount
arg. How should write .yaml
file?
kubectl does support mount via volume (https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/)
apiVersion: v1
kind: Pod
metadata:
name: redis
spec:
containers:
- name: redis
image: redis
volumeMounts:
- name: redis-storage
mountPath: /data/redis
volumes:
- name: redis-storage
emptyDir: {}
Go through it first and adjust accordingly.