프로그래밍

[책_컨테이너 인프라 환경 구축을 위한 쿠버네티스/도커] 1. 설치하기 (vagrant , Virtual Box)

가시가되어 2023. 2. 22. 16:05

http://www.yes24.com/Product/Goods/102099414

[컨테이너 인프라 환경 구축을 위한 쿠버네티스/도커 - YES24

실무에 바로 적용할 수 있는 컨테이너 인프라 환경 기술!IT 자원을 효율적으로 빠르게 사용할 수 있는 방법으로 컨테이너 환경이 거론되었으나 그동안 관리가 어렵고 복잡해서 상용되기 어려웠

www.yes24.com](http://www.yes24.com/Product/Goods/102099414)

Virtual Box 설치 하기

https://www.virtualbox.org/wiki/Download_Old_Builds_6_1

[Download_Old_Builds_6_1 – Oracle VM VirtualBox

www.virtualbox.org](https://www.virtualbox.org/wiki/Download_Old_Builds_6_1)

ualBox 6.1.12 (released July 14 2020) 설치.
-> 기본 Defalut 설정대로 Next로 설치.

  1. Vagrant 설치

https://www.vagrantup.com/downloads.html
-> 기본 Defalut 설정대로 Next로 설치.

[Install | Vagrant | HashiCorp Developer

Explore Vagrant product documentation, tutorials, and examples.

developer.hashicorp.com](https://www.vagrantup.com/downloads.html)

C:\HashiCorp 경로에 Vagrant 생성됨.

3 베이그런트 구성 및 테스트

3-2 Vagrantfile 수정
config.vm.box 및 vm.box_version 수정
Vagrant.configure("2") do |config|
config.vm.box = "sysnet4admin/CentOS-k8s"
config.vm.box_version = "0.7.4"
end

3-1. https://app.vagrantup.com/sysnet4admin/boxes/CentOS-k8s/versions/0.7.4
VagrantCloud 에서 저자가 올린 CentOS-k8s 가상이미지를 활용함.

3-3 cmd(명령프롬포트) 실행
vagrant init sysnet4admin/CentOS-k8s
--box-version 0.7.4
vagrant up

설치 중 Error mount: unknown filesystem type 'vboxsf'

Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000,_netdev vagrant /vagrant

The error output from the command was:

mount: unknown filesystem type 'vboxsf'

-> shared folder에 mount를 할 수 없다고 뜸.
https://stackoverflow.com/questions/43492322/vagrant-was-unable-to-mount-virtualbox-shared-folders

-> vagrant plugin install vagrant-vbguest

3-4 vargarnt ssh 명령어 실행
접속 확인 및 uptime , cat /etc/redhat-release