window docker desktop 2.3.0.2에서 kubernetes volume mount가 되지 않는 현상
2020-05-12 새벽에 docker desktop 업데이트 알림이 와서 업데이트를 하고 나니 kubernetes에서 사용하던 volume mount 설정이 제대로 동작하지 않는 것을 확인하였다.
volumes:
- name: jenkins-home
hostPath:
path: /C/data/jenkins-home
- name: jenkins-m2
hostPath:
path: /C/data/jenkins-m2
위와 같이 hostPath를 사용하고 있었는데 window volume을 제대로 인식하지 못했다.
2.3.x 버전 이후 드라이브 공유에서 디렉터리 공유 형태로 변경되면서 뭔가 문제가 있는 듯하다.
기존의 네트워크 드라이버 공유와 비슷하게 디렉터리 공유 설정을 한 후
docker 컨테이너 생성 시 -v 옵션을 사용한 volume mount의 경우는 정상 동작하였다.
하지만 kubernetes에서 실행하면 window volume mount가 되지 않는 현상이 있었다.
비슷한 현상이 다른 사람들에게도 있는 것 같고 관련 이슈가 등록되어 있다.
https://github.com/docker/for-win/issues/6628
bind mounting of a mounted host directory in a container is broken in v.2.3.0.2 · Issue #6628 · docker/for-win
[ x] I have tried with the latest version of my channel (Stable or Edge) I have uploaded Diagnostics Diagnostics ID: Expected behavior Just before updating to v.2.3.0.2 I was able to mount any dire...
github.com
위 이슈의 댓글엔 /host_mnt/C/... 와 같이 /host_mnt prefix를 추가하면 동작하더란 말이 있는데 내 경우는 host_mnt 접근도 제대로 되지 않고 있었다.
해당 이슈가 해결되기 전까지 이번 버전은 건너뛰고 사용하던가 아니면 k8s대신 docker container로만 사용해야 할 것 같다.
2020-05-17
관련 문제에 대해 수정된 버전을 공개했다.
https://github.com/docker/for-win/issues/6628#issuecomment-629232405
bind mounting of a mounted host directory in a container is broken in v.2.3.0.2 · Issue #6628 · docker/for-win
[ x] I have tried with the latest version of my channel (Stable or Edge) I have uploaded Diagnostics Diagnostics ID: Expected behavior Just before updating to v.2.3.0.2 I was able to mount any dire...
github.com
해당 댓글에 안내된 45279 버전으로 변경 후 확인해보니 volume 문제는 어느 정도 해결된 듯하다.
하지만 jenkins volume mount는 잘되는데 mariadb랑 mssql이 안된다.
2020-05-28
2.3.0.3 버전이 공개되었다.
해당 버전 설치 후 확인해보니 관련된 문제가 모두 해결된 듯 하다.