Provide a Kubernetes cifs for CoreOS (for example) to use, optimized for speed.
Kubernetes:
docker run -it --rm -v /etc/kubernetes/volumeplugins/hodique.info~cifs:/target sigma/cifs_k8s_plugin /targetOpenshift:
docker run -it --rm -v /usr/libexec/kubernetes/kubelet-plugins/volume/exec/hodique.info~cifs:/target sigma/cifs_k8s_plugin /targetAfter installing the plugin, restart the kubelet or the origin-node service so that the plugin is detected.
Assuming a //192.168.56.101/TEST cifs share, accessible by a TESTER user with a SECRET password.
- create secret to access the cifs share
kubectl create secret generic cifscreds --from-literal username=TESTER --from-literal password=SECRET- create the cifs-enabled pod
cat <<EOF | tee pod.yml
apiVersion: v1
kind: Pod
metadata:
name: cc
spec:
containers:
- name: cc
image: nginx
volumeMounts:
- name: test
mountPath: /data
ports:
- containerPort: 80
volumes:
- name: test
flexVolume:
driver: "hodique.info/cifs"
secretRef:
name: cifscreds
readOnly: true
options:
source: "//192.168.56.101/TEST"
mountOptions: "dir_mode=0700,file_mode=0600"
EOFFeel free to edit the flexVolume specification to match your needs.
- run the pod
kubectl create -f pod.yml- verify the pod
kubectl get pod cc
kubectl exec cc -- ls -l /datadocker build process split into a 'builder' docker and a 'runtime' docker to keep final docker image as small as possible.
To build the runtime docker image, clone this project and then run the following command:
$ make containerNOTE: this repository cannot be built automatically by docker hub.