์๋ก ์ฐ ๋งฅ๋ถ์ผ๋ก ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๊ตฌ์ถํ๊ธฐ (feat. arm64)
์๋ก ์ฐ ๋งฅ๋ถ์ผ๋ก ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๊ตฌ์ถํ๊ธฐ (feat. arm64) ๊ด๋ จ
ํ๋ธ๋ฆฟPC์์ ์ฃผ๋ก ์ฐ์ด๋ arm64 ์ํคํ ์ฒ๊ฐ ์ ํ์ M1 ๋ ธํธ๋ถ์ ์ ์ฉ๋๋ฉฐ, arm64 ๊ธฐ๋ฐ ๋ ธํธ๋ถ ์์ฅ์ด ๊ฐํ๋ฅด๊ฒ ์ฑ์ฅํ๊ธฐ ์์ํ์ต๋๋ค.
์ผ๋ฐ ๋ ธํธ๋ถ ์์ฅ๋ฟ๋ง ์๋๋ผ ๊ฐ ํด๋ผ์ฐ๋ ์ฌ์์๋ ๋ ์์ ์ผ๋ก ๊ฐ๋ฐํ arm64 ๊ธฐ๋ฐ ์ปดํจํ ์ธ์คํด์ค๋ฅผ ์ถ์ํ๊ณ ์์ต๋๋ค. ์ฑ๊ณต์ ์ธ ์ ํ์ ํตํด ํจ๊ณผ์ ์ผ๋ก TCO(์ด์์ ๋น์ฉ)๋ฅผ ์ ๊ฐํ ์ฌ๋ก๋ค ์ญ์ ์์ ๋์ค๊ณ ์์ต๋๋ค.
์ด๋ฌํ ํ๋ฆ์ ๋ฐ๋ง์ถฐ ์ฟ ๋ฒ๋คํฐ์ค ์ปจํธ๋กค ํ๋ ์ธ ๋ ธ๋์ ๊ตฌ์ฑ ์์ ๋ํ arm64 ๊ธฐ๋ฐ์ ์ง์ํ๋ ์ถ์ธ์ ๋๋ค. ๋ค์ํ ์ปจํ ์ด๋ ์ด๋ฏธ์ง ์ญ์ x86-64(amd64)์ ํจ๊ป arm64๋ฅผ ์ง์ํ๊ณ ์์ต๋๋ค.
๋ฐ๋ผ์ ๋๋ง์ arm64 ๊ธฐ๋ฐ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ๋ง๋ค์ด ๋ณด๋ฉฐ ์ด๋ฌํ ๋ณํ์ ๋๋นํ ์ ์๋ ์๊ฐ์ ๊ฐ์ ธ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
์ฃผ์ ๋จ๊ณ overview
arm64 ๊ธฐ๋ฐ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ๋ง๋๋ ๊ณผ์ ์ ๋ค์๊ณผ ๊ฐ์ด ์งํ๋ฉ๋๋ค.
- arm64 ๊ธฐ๋ฐ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ๋ฐฐํฌํ๊ธฐ ์ํ ์ํํธ์จ์ด ์ค์นํ๊ธฐ
- ์ค์นํ ์ํํธ์จ์ด๋ก ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๊ตฌ์ฑํ๊ธฐ
- ํฐ๋ฏธ๋ ํ๋ก๊ทธ๋จ์ผ๋ก ๊ตฌ์ฑ๋ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ํ์ธํ๊ณ , ๊ฐ๋จํ ์ ํ๋ฆฌ์ผ์ด์ ๋ฐฐํฌํ๊ธฐ
์ด์ฒ๋ผ ๊ฐ๋จํ 3๋จ๊ณ๋ก๋ ์ค์ arm64 ๊ธฐ๋ฐ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ๊ตฌ์ฑํ ์ ์์ต๋๋ค. ์์ํด ๋ณผ๊น์?
>
arm64 ๊ธฐ๋ฐ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๊ตฌ์ถํ๊ธฐ
1. arm64 ๊ธฐ๋ฐ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ๋ฐฐํฌํ๊ธฐ ์ํ ์ํํธ์จ์ด ์ค์นํ๊ธฐ
์์ฝ๊ฒ ์ค์นํ ์ ์๋๋ก ์ด๋ฏธ ๊ตฌ์ฑ์ด ์๋ฃ๋ ๊นํ๋ธ ์์ค (sysnet4admin/_Lecture_k8s_learning.kit
)๋ฅผ ํด๋ก ํด์ ๋ก์ปฌ์ ๋ด๋ ค๋ฐ์ต๋๋ค.
git clone https://github.com/sysnet4admin/_Lecture_k8s_learning.kit
#
# Cloning into '_Lecture_k8s_learning.kit'...
# remote: Enumerating objects: 4956, done.
# ...
๋จผ์ ๋ด๋ ค๋ฐ์ ์์ค ๋๋ ํฐ๋ฆฌ ๊ฐ์ด๋ฐ ch2/2.4๋ก ์ด๋ํฉ์๋ค. ํด๋น ๋๋ ํฐ๋ฆฌ์๋ arm64 ๊ธฐ๋ฐ ๋ฐฐํฌ๋ฅผ ์ํ ์ํํธ์จ์ด, ํฐ๋ฏธ๋ ํ๋ก๊ทธ๋จ ๊ทธ๋ฆฌ๊ณ ๊ด๋ จ ๋ด์ฉ๋ค์ด ์์ต๋๋ค.
์ค์นํด์ผ ํ๋ ์ํํธ์จ์ด๋ ๋ค์ 3๊ฐ์ง์ ๋๋ค. ์์๋๋ก ์ค์น ๊ณผ์ ์ ์ง์ด๋ณด๊ฒ ์ต๋๋ค.
- VM์จ์ด ํจ์ (VMware Fusion)
- ๋ฒ ์ด๊ทธ๋ฐํธ (Vagrant)
- ํ๋น (Tabby)
cd _Lecture_k8s_learning.kit/ch2/2.4
ll
#
# total 0
# drwxr-xr-x@ 8 hj staff 256B Jun 11 14:24 k8s-adv/
# drwxr-xr-x@ 6 hj staff 1928 Jun 11 14:24 scripts/
# drwxr-xr-x@ 4 hj staff 128B Jun 11 14:24 tabby-v1.0.207/ 96B Jun 11 14:24 vagrant-v2.4.1/
VM์จ์ด ํจ์ (VMware Fusion) ์ค์น
VM์จ์ด ํจ์ ์ ์ค์นํ๋ ค๋ฉด brew install์ ๊ทธ๋๋ก ์ธ ์๋ ์์ต๋๋ค. ๊ทธ๋ฌ๋ ํธํ์ฑ ์ ์ง๋ฅผ ์ํด ์ค๋น๋ rb๋ฅผ ์ด์ฉํด ๊ณ ์ ๋ v13.5.2 ๋ฒ์ ์ VM์จ์ด ํจ์ ์ ์ค์นํ๊ฒ ์ต๋๋ค.
brwe install --cask ./vmware-fusion-v13.5.2/vmware-fusion.rb
#
# ==> Auto-updating Homebrew..
# Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew).
# ==> Downloading
# http://softwareupdate.vmware.com/cds/vmw-desktop/fusion/13.5.2/23775688/uni versal/core/com.vmware.fusion.zip.tar
# ==> Downloading from
# https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/13.5.2/23775688/un iversal/core/com.vmware.fusion.zip.tar
################################################################ 100.0%
# ==> Installing Cask vmware-fusion
# ==> Moving App 'VMware Fusion.app' to '/Applications/VMware Fusion.app'
# ==> Linking Binary 'vmnet-cfgcli' to '/opt/homebrew/bin/vmnet-cfgcli'
# ==> Linking Binary 'vmnet-cli' to '/opt/homebrew/bin/vmnet-cli'
# ==> Linking Binary 'vmnet-dhcpd' to '/opt/homebrew/bin/vmnet-dhcpd'
# ==> Linking Binary 'vmnet-natd' to '/opt/homebrew/bin/vmnet-natd'
# ==> Linking Binary 'vmnet-netifup' to '/opt/homebrew/bin/vmnet-netifup'
# ==> Linking Binary 'vmnet-sniffer' to '/opt/homebrew/bin/vmnet-sniffer*
# ==> Linking Binary 'vmrest' to '/opt/homebrew/bin/vmrest'
# ==> Linking Binary 'vmrun' to '/opt/homebrew/bin/vmrun'
# ==> Linking Binary 'vmss2core' to '/opt/homebrew/bin/vmss2core*
# ==> Linking Binary 'ovftool' to '/opt/homebrew/bin/ovftool'
# ==> Linking Binary 'vmware-aewp' to '/opt/homebrew/bin/vmware-aewp'
# ==> Linking Binary 'vmware-authd' to '/opt/homebrew/bin/vmware-authd'
# ==> Linking Binary 'vmware-id' to '/opt/homebrew/bin/vmware-id'
# ==> Linking Binary 'vmware-ntfs' to '/opt/homebrew/bin/vmware-ntfs'
# ==> Linking Binary 'vmware-rawdiskAuthTool' to '/ opt/homebrew/bin/vmware-rawdiskAuthTool'
# ==> Linking Binary 'vmware-rawdiskCreator' to '/opt/homebrew/bin/vmware-rawdiskCreator'
# ==> Linking Binary 'vmware-remotemks' to '/opt/homebrew/bin/vmware-remotemks'
# ==> Linking Binary 'vmware-usbarbitrator' to '/opt/homebrew/bin/vmware-usbarbitrator'
# ==> Linking Binary 'vmware-vdiskmanager to '/opt/homebrew/bin/vmware-vdiskmanager'
# ==> Linking Binary 'vmware-vmdkserver' to '/opt/homebrew/bin/vmware-vmdkserver'
# ==> Linking Binary 'vmware-vmx' to '/opt/homebrew/bin/vmware-vmx'
# ==> Linking Binary 'vmware-vmx-debug' to '/opt/homebrew/bin/vmware-vmx-debug'
# ==> Linking Binary 'vmware-vmx-stats' to '/opt/homebrew/bin/vmware-vmx-stats'
# ==> Linking Binary 'vmware-cloneBootCamp' to '/opt/homebrew/bin/vmware-cloneBootCamp
# ==> Linking Binary 'vctl' to '/opt/homebrew/bin/vctl' 3
# ==> Linking Binary 'vmnet-bridge' to '/opt/homebrew/bin/vmnet-bridge'
# Password:
# vmware-fusion was successfully installed!
์ค์น๊ฐ ๋๋ ํ์๋ ๋ฐ๋์ VM์จ์ด ํจ์ ์ ์์ํ๊ณ ๊ฐ์ธ ์ฌ์ฉ์ ๋ผ์ด์ผ์ค๋ฅผ ๋์ํด ์ฃผ์ ์ผ ํฉ๋๋ค.
VM์จ์ด ํจ์
์ต๊ทผ, VM์จ์ด๋ฅผ ์ธ์ํ ๋ธ๋ก๋์ปด์์๋ VM์จ์ด ํจ์ v13.5.2๋ถํฐ ๊ฐ์ธ ์ฌ์ฉ์์๊ฒ ์ด๋ฅผ ๋ฌด๋ฃ๋ก ์ ๊ณตํ๋ค๊ณ ๋ฐํํ์ต๋๋ค. ๋ฌผ๋ก ์ด์ ์๋ ํ์ ๊ฐ์ ๋ง ํ๋ฉด ๋ฐ๋ก ๊ฐ์ธ์ฉ ๋ผ์ด์ผ์ค๋ฅผ ๋ฐ๊ธ๋ฐ์์ ์ ๋ ฅํ ์ ์์์ง๋ง, ์ ๋ฉด์ ์ธ ๋ฌด๋ฃ ๊ณํ์ ๋ฐํํ ๊ฒ์ด์ฃ . ์ด ๊ธ์ ๋ฐํํ๋ 2024๋ 7์ ๊ธฐ์ค, arm64 ๊ฐ์ธ ์ฌ์ฉ์์๊ฒ๋ ์ด๋ ๋ฌด์๋ณด๋ค๋ VM์จ์ด ํจ์ ์ด ํธํ๊ณ ๊ฐ๋ ฅํ ํ์ดํผ๋ฐ์ด์ ๋๊ตฌ์ผ ๊ฒ์ ๋๋ค. ๋ฐ๋ผ์ ์ฌ๊ธฐ์๋ VM์จ์ด ํจ์ ์ ์ฌ์ฉํด์ ์ค์ต ํ๊ฒฝ์ ๊ตฌ์ฑํฉ๋๋ค.
๊ทธ๋ค์์ ์ ํธ๋ฆฌํฐ ์ค์น์ ๋๋ค. ์ฐ๋ฆฌ๋ vagrant-vmware-utility v1.0.22๋ฅผ ์ค์นํฉ๋๋ค. ํด๋น ์ ํธ๋ฆฌํฐ๋ ๊ณง์ด์ด ์ค์นํ ๋ฒ ์ด๊ทธ๋ฐํธ์์ VM์จ์ด์ ํ์ํ ๊ธฐ๋ฅ์ ์์ฒญํ ๋ ์ฌ์ฉํฉ๋๋ค.
brwe install --cask ./vagrant-vmware-utility-1.0.22/vagrant-vmware-utility.rb
#
# ==> Downloading https://releases.hashicorp.com/vagrant-vmware-utility/1.0.22/vagrant-vmware-utility_1.0.22_darwin_amd64.dmg
# Already downloaded: /Users/hj/Library/Caches/Homebrew/downloads/3c4fc35e6cba00b55837775a667e140 3d2be10fea8525b75f1beb88b074df283--vagrant-vmware-utility_1.0.22_darwin_amd 64.dmg
# ==> Installing Cask vagrant-vmware-utility
# ==> Running installer for vagrant-vmware-utility with sudo; the password may be necessary.
# installer: Package name is Vagrant VMware Utility
# installer: Installing at base path /
# installer: The install was successful.
# vagrant-vmware-utility was successfully installed!
์ด๋ ๊ฒ ์ค์นํ VM์จ์ด ์ ํธ๋ฆฌํฐ๋ฅผ ์๋น์ค ํํ๋ก ์์ํ๋ ค๋ฉด launchctl์ ๊ฑฐ์ณ ๋ก๋ํด์ผ ํฉ๋๋ค. ๊ทธ๋ฌ๋ ๋ฌธ์ ๊ฐ ์๊ฒผ์ ๋๋, ์ด๋ฅผ ๊ณ์ ๋ค์ ์คํํด์ผ ํ ์๋ ์์ต๋๋ค. ๋ํ ๋คํธ์ํฌ ๋ฌธ์ ์ธ ๊ฒฝ์ฐ netstat ๋ช ๋ น์ผ๋ก ์ด๋ฅผ ์ ๊ฒํด์ผ ํ ์๋ ์์ต๋๋ค.
๋ฐ๋ผ์ ์ด๋ฅผ ์์ฝ๊ฒ ํ๊ธฐ ์ํด ์์ฑํ ์คํฌ๋ฆฝํธ 2๊ฐ์ง(copy_launchctl-all-vmware-utility.sh
, copy_netstat-anvp.sh
)๋ฅผ ์คํํ๊ฒ ์ต๋๋ค. /usr/local/bin
๋ฐ์ ๋ช
๋ น์ด ํํ๋ก ๋ง๋ค์ด ๋๊ฒ ์ต๋๋ค.
sudo ./scripts/copy_launchctl-all-vmware-utility.sh
sudo ./scripts/copy_netstat-anvp.sh
ํด๋น ์คํฌ๋ฆฝํธ๋ก ์์ฑํ ๋ช ๋ น์ ์๋์ ๊ฐ์ต๋๋ค.
netstat-anvp #์ด๋ ค ์๋ ๋คํธ์ํฌ ํฌํธ ๋ฐ ์ ๋ณด ํ์ธ
#
# Active Internet connections (including servers)
# Proto Recv-Q Send-Q Local Address Foreign Address
# tcp6 0 0 *.49365 *.*
# [์๋ต]
launchctl-<tab>
#
# launchctl (Interfaces with launchd)
# launchctl-load-vmware-utility (command) # vmware-utility๋ฅผ ๋ก๋ํจ
# launchctl-reload-vmware-utility (command) # vmware-utility๋ฅผ ๋ค์ ๋ก๋ํจ
# launchctl-unload-vmware-utility (command) # vmware-utility๋ฅผ ๋ก๋ํ์ง ์์ ์ํ๋ก ๋๋๋ฆผ
๊ทธ๋ค์, vmware-utility
๋ฅผ ์๋น์ค๋ก ๋ก๋ํ๊ฒ ์ต๋๋ค. ๋ฒ ์ด๊ทธ๋ฐํธ์ ์ ์์ ์ผ๋ก ์ํตํ๊ธฐ ์ํจ์
๋๋ค.
launchctl-load-vmware-utility
#
์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๊ฐ ํธ์คํธ ์์คํ
๊ณผ ํต์ ํ ์ธํฐํ์ด์ค๋ ์ถ๊ฐํด์ผ ํฉ๋๋ค. ์ฐ๋ฆฌ๋ vf_net_create_vnet2.sh
๋ฅผ ์คํํ ๊ฒ๋๋ค. ์ด ์คํฌ๋ฆฝํธ๋ VM์จ์ด์ vmnet7 ์ธํฐํ์ด์ค๋ฅผ ์์ฑํด ํธ์คํธ์ 192.168.1.0 ๋คํธ์ํฌ๋ก ํต์ ํ ์ ์๊ฒ ํด์ค๋๋ค.
์งํ ๋์ค์ ์ผ๋ถ ์ธํฐํ์ด์ค์์ ์คํจํ ์ ์๋๋ฐ์. vmnet7์ ์์ฑํ๊ณ ์ค์ ์ ์ ์ฉํ๋ ๊ฒ์ด ์ฃผ๋ชฉ์ ์ด๋ฏ๋ก vmnet7๋ง ๋ฌธ์ ์๋ค๋ฉด ๊ด์ฐฎ์ต๋๋ค.
sudo ./scripts/vf_net_create_vnet2.sh
#
# Library Loaded
# vmnetcfg: vnlvnetcfgadd successfully added key: value - VNET_7_DHCP: no
#
# Library Loaded
# vmnetcfg: vnlvnetcfgadd successfully added key:value - VNET_7_HOSTONLY_SUBNET:192.168.1.0
#
# Library Loaded
# vmnetcfg: vnlvnetcfgadd successfully added key:value - VNET_7_HOSTONLY_NETMASK:255.255.255.0
#
# Library Loaded
# vmnetcfg: vnlvnetcfgadd successfully added key:value - VNET_7_NAT:yes
#
# Library Loaded
# vmnetcfg: vnlvnetcfgadd successfully added key:value - VNET_7_VIRTUAL_ADAPTER:yes
#
# Stopped all configured services on all networks
# Backed up existing network settings to backup file "/tmp/vmware.LHp0fq"
# Restored network settings
# Stopped all configured services on all networks
# Enabled hostonly virtual adapter on vmnet1
# Failed to start DHCP service on vmnet1
# Failed to start NAT service on vmnet7
# Enabled hostonly virtual adapter on vmnet7
# Failed to start NAT service on vmnet8
# Enabled hostonly virtual adapter on vmnet8
# Failed to start DHCP service on vmnet8
# Failed to start some/all services
๋ฒ ์ด๊ทธ๋ฐํธ(Vagrant) ์ค์น+
๋ฒ ์ด๊ทธ๋ฐํธ(Vagrant) ์ญ์ ๊ณ ์ ๋ฒ์ ์ ์ค์นํฉ๋๋ค. ์ง์ ๋ rb๋ฅผ ํ์ฉํด v2.4.1์ ๋ฒ ์ด๊ทธ๋ฐํธ๋ฅผ ์ค์นํฉ๋๋ค.
brew install --cask ./vagrant-v2.4.1/vagrant.rb
#
# ==> Auto-updating Homebrew...
# Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
# ==> Downloading
# https://releases.hashicorp.com/vagrant/2.4.1/vagrant_2.4.1_darwin_arm64.dmg
# Already downloaded:
# /Users/hj/Library/Caches/Homebrew/downloads/4b70740a5b8c3e37fa35305a64490aa c6ab9a1a9155e877c27e82fdff65d61fc--vagrant_2.4.1_darwin_arm64.dmg
# ==> Installing Cask vagrant
# ==> Running installer for vagrant with sudo; the password may be necessary.
# installer: Package name is Vagrant
# installer: Upgrading at base path /
# installer: The upgrade was successful.
# vagrant was successfully installed!
๋ฒ ์ด๊ทธ๋ฐํธ๊ฐ VM์จ์ด์ ์ ์์ ์ผ๋ก ํต์ ํ๋ ค๋ฉด vmware-utility
๋ฟ๋ง ์๋๋ผ ๋ณ๋ ํ๋ฌ๊ทธ์ธ์ด ํ์ํฉ๋๋ค. ์ฐ๋ฆฌ๋ vagrant-vmware-desktop
ํ๋ฌ๊ทธ์ธ์ ์ค์นํ๊ฒ ์ต๋๋ค. ์ด ํ๋ฌ๊ทธ์ธ์ ๋ฒ ์ด๊ทธ๋ฐํธ ๋ฒ์ ์ ๋ฐ๋ผ ์ค์น๋๊ธฐ ๋๋ฌธ์, ๋ฐ๋ก ์ด๋ฅผ ๊ณ ์ ํด ์ค ํ์๋ ์์ต๋๋ค.
vagrant plugin install vagrant-vmware-desktop
#
# Installing the 'vagrant-vmware-desktop' plugin. This can take a few minutes...
# Fetching vagrant-vmware-desktop-3.0.3.gem
# Installed the plugin 'vagrant-vmware-desktop (3.0.3)'!
ํ๋น(Tabby) ์ค์น+
๋ง์ง๋ง์ผ๋ก ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๋ฐฐํฌ ์ดํ, ์ ์์ ๋์์ฃผ๋ ํฐ๋ฏธ๋ ํ๋ก๊ทธ๋จ ํ๋น๋ฅผ ์ค์นํฉ๋๋ค. ํ๋น ์ญ์ ์ํํ ํธํ์ ์ํด rb
๋ฅผ ์ด์ฉํด v1.0.207์ ์ค์นํฉ๋๋ค.
brew install --cask./tabby-v1.0.207/tabby.rb
#
# ==> Downloading
# https://github.com/Eugeny/tabby/releases/download/v1.0.207/tabby-1.0.207-macos-arm64.zip
# Already downloaded:
# /Users/hj/Library/Caches/Homebrew/downloads/6ac0899dd17d84fb668f23226094b67 4bf7f5615155b29ba53a109c4d519e782--tabby-1.0.207-macos-arm64.zip
# ==> Installing Cask tabby
# ==> Moving App 'Tabby.app' to '/Applications/Tabby.app'
# tabby was successfully installed!
์ค์น๋ฅผ ๋ง์ณค๋์? ์ ์ ์ ๋ณด๋ฅผ ๋ฏธ๋ฆฌ ์
๋ ฅํด ๋ ํ์ผ (config.yaml
)์ ๋ณต์ฌํด ์ ์ฉํ๋ฉฐ ๋ฐ๋ก ์
๋ ฅํ๋ ๋ฒ๊ฑฐ๋ก์์ ์ค์ด๊ฒ ์ต๋๋ค.
cp ./tabby-v1.0.207/config.yaml ~/Library/Application\ Support/tabby
2. ์ค์นํ ์ํํธ์จ์ด๋ก ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๊ตฌ์ฑํ๊ธฐ
์ด์ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ๊ตฌ์ฑํ ์ฐจ๋ก์ ๋๋ค. ์ด ๊ณผ์ ์ ๊ฐ๋ต์ ์ผ๋ก ๊ทธ๋ฆฌ๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
๊ฐ์ฅ ๋จผ์ ๋ฒ ์ด๊ทธ๋ฐํธ์์ VM์จ์ด ํจ์ ์ผ๋ก ์์ฒญํ ๋ด์ฉ๋ค์ ๋ด์ k8s-adv
๋๋ ํฐ๋ฆฌ๋ก ์ด๋ํ๊ฒ ์ต๋๋ค. ํด๋น ๋๋ ํฐ๋ฆฌ์ ๊ตฌ์ฑ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
cd k8s-adv/
ll
#
# total 48
# -rw-r--r--@ 1 hj staff 2.3K Jun 11 14:24 Vagrantfile
# -rwxr-xr-x@ 1 hj staff 1.8K Jun 11 14:24 controlplane_node.sh*
# -rwxr-xr-x@ 1 hj staff 738B Jun 11 14:24 extra_k8s_pkgs.sh*
# -rwxr-xr-x@ 1 hj staff 1.4K Jun 11 14:24 k8s_env_build.sh*
# -rwxr-xr-x@ 1 hj staff 1.0K Jun 11 14:24 k8s_pkg_cfg.sh*
# -rwxr-xr-x@ 1 hj staff 166B Jun 11 14:24 worker_nodes.sh*
์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๊ตฌ์ฑ์ vagrant up
๋ช
๋ น์ผ๋ก ์์ํฉ๋๋ค.
์ด๋ VM์จ์ด ํจ์ ์ ์ ์ฝ์ผ๋ก ํ๋ฉด์ ๊ตฌ์ฑ์ ์์ํ๋ ๊ฐ์ ๋จธ์ ์ด ๊ณ์ ํ์ ๋ ๊ฒ๋๋ค. ์ด ๋ถ๋ถ์ ๋ฐ๋ก ๊ฑด๋๋ฆด ํ์๋, ์ฌ๊ธฐ๋ก ์ ์ํ ํ์๋ ์์ต๋๋ค. VM์จ์ด ํจ์ ์์ ๊ตฌ์ฑ๋ ๊ฐ์ ๋จธ์ ์ ํ์ธํ๋ ค๊ณ ์ค์ ํ ์ต์ ๋๋ฌธ์ ์ด๋ ๊ฒ ๋์ํ ๋ฟ์ ๋๋ค. vagrant up ๋ชจ๋ ๊ณผ์ ์ด ์๋ฃ๋๋ฉด ์๋์ ๊ฐ์ ์ฝ๋๋ฅผ ๋ณผ ์ ์์ต๋๋ค.
vagrant up
#
# Bringing machine 'cp-k8s-1.30.1' up with 'vmware_desktop' provider...
# Bringing machine 'w1-k8s-1.30.1' up with 'vmware_desktop' provider...
# Bringing machine 'w2-k8s-1.30.1' up with 'vmware_desktop' provider...
# Bringing machine 'w3-k8s-1.30.1' up with 'vmware_desktop' provider...
# ==> cp-k8s-1.30.1: Box sysnet4admin/Ubuntu-k8s' could not be found.
# Attempting to find and install...
# cp-k8s-1.30.1: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
# cp-k8s-1.30.1: Box Version: >= 0
# ==> cp-k8s-1.30.1: Loading metadata for box sysnet4admin/Ubuntu-k8s'
# cp-k8s-1.30.1: URL: https://vagrantcloud.com/api/v2/vagrant/sysnet4admin/Ubuntu-k8s
# ==> cp-k8s-1.30.1: Adding box sysnet4admin/Ubuntu-k8s' (v0.8.5) for provider: vmware_desktop (arm64)
# cp-k8s-1.30.1: Downloading: https://vagrantcloud.com/sysnet4admin/boxes/Ubuntu-k8s/versions/0.8.5/provi ders/vmware_desktop/arm64/vagrant.box
# Progress: 10% (Rate: 1733k/s, Estimated time remaining: 0:04:00)
# ==> cp-k8s-1.30.1: Successfully added box 'sysnet4admin/Ubuntu-k8s' (v0.8.5) for 'vmware_desktop (arm64'!
# ==> cp-k8s-1.30.1: Cloning VMware VM: 'sysnet4admin/Ubuntu-k8s'. This can take some time... ==> cp-k8s-1.30.1: Checking if box sysnet4admin/Ubuntu-k8s' version '0.8.5' is up to date...
# ==> cp-k8s-1.30.1: Verifying vmnet devices are healthy...
#
# [์ค๋ต]
#
# w3-k8s-1.30.1: This node has joined the cluster:
# w3-k8s-1.30.1: * Certificate signing request was sent to apiserver and a response was received.
# w3-k8s-1.30.1: * The Kubelet was informed of the new secure connection details.
# w3-k8s-1.30.1:
# w3-k8s-1.30.1: Run 'kubectl get nodes' on the control-plane to see this node join the cluster.
# w3-k8s-1.30.1:
3. ํฐ๋ฏธ๋ ํ๋ก๊ทธ๋จ์ผ๋ก ๊ตฌ์ฑ๋ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ํ์ธํ๊ณ , ๊ฐ๋จํ ์ ํ๋ฆฌ์ผ์ด์ ๋ฐฐํฌํ๊ธฐ
๋ฐฐํฌํ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ ๋ ธ๋์ ์ ์ํ๋ ค๋ฉด, ์ด๋ฅผ ์ํด ์ค์นํ ํฐ๋ฏธ๋ ํ๋ก๊ทธ๋จ ํ๋น๋ฅผ ์คํํ๋ฉด ๋ฉ๋๋ค.
cp-k8s
์ ์ ์ํ๋์? k get nodes
๊ทธ๋ฆฌ๊ณ k get po -A
๋ฅผ ์
๋ ฅํด ๋ฐฐํฌ๊ฐ ์ ์์ ์ผ๋ก ์ด๋ฃจ์ด์ก๋์ง ํ์ธํฉ์๋ค.
k get nodes
#
# NAME STATUS ROLES AGE VERSION
# cp-k8s Ready control-plane 9m7s v1.30.1
# w1-k8s Ready 6m31s v1.30.1
# w2-k8s Ready 4m8s v1.30.1
# w3-k8s Ready 2m28s v1.30.1
k get po -A
#
# NAMESPACE NAME READY STATUS RESTARTS AGE
# kube-system calico-kube-controllers-6cdb97b867-hhl9q 1/1 Running 0 8m27s
# kube-system calico-node-bkgkz 1/1 Running 0 4m145
# kube-system calico-node-dk72k 1/1 Running 0 8m28s
# kube-system calico-node-h8wp2 1/1 Running 0 6m37s
# kube-system calico-node-sbqg8 0/1 Init:2/3 1 (26s ago) 2m34s
# kube-system coredns-7db6d8ff4d-6d2mv 1/1 Running 0 8m27s
# kube-system coredns-7db6d8ff4d-hj7lg 1/1 Running 0 8m27s
# kube-system etcd-cp-k8s 1/1 Running 1 (9m5s ago) 9m13s
# kube-system kube-apiserver-cp-k8s 1/1 Running 1 (9m4s ago) 9m13s
# kube-system kube-controller-manager-cp-k8s 1/1 Running 1 (9m4s ago) 9m13s
# kube-system kube-proxy-2hbfv 1/1 Running 0 2m34s
# kube-system kube-proxy-4wfzw 1/1 Running 0 4m14s
# kube-system kube-proxy-f58wx 1/1 Running 0 8m28s
# kube-system kube-proxy-s8pmp 1/1 Running 0 6m37s
# kube-system kube-scheduler-cp-k8s 1/1 Running 1 (9m4s ago) 9m13s
# metallb-system controller-57cf8fbb89-qntjh 1/1 Running 0 8m27s
# metallb-system speaker-4z8rb 0/1 ContainerCreating 0 21s
# metallb-system speaker-hvxqq 1/1 Running 0 5m6s
# metallb-system speaker-mg7pb 1/1 Running 0 2m36s
# metallb-system speaker-q6fk9 1/1 Running 0 7m53s
๋ก๋๋ฐธ๋ฐ์ ์์ฑ์ ๋์์ ์ฃผ๋ MetalLB IP Pool์ด ์ ์ ๋์ํ๋์ง๋ ํ์ธํด ๋ณด๊ฒ ์ต๋๋ค. k get ipaddresspools.metallb.io -A
๋ฅผ ์
๋ ฅํ๊ณ ์๋์ ๊ฐ์ ํ๋ฉด์ด ๋์ค๋์ง ํ์ธํ๊ฒ ์ต๋๋ค. ํด๋น ๋ด์ฉ์ ์ ์ํ๊ณ ๋ฐ๋ก ๋ณด์ด์ง๋ ์์ต๋๋ค. cp-k8s
๋ฐฐํฌ๋ฅผ ์๋ฃํ ๋ค์ ์ฝ 10๋ถ ํ์ ๋์ํ๋๋ก ์ค๊ณ๋์์ฃ . ๋ฐ๋ผ์ ์๋ ํ๋ฉด์ด ๋์ค์ง ์๋๋ค๋ฉด, ์ข ๋ ๊ธฐ๋ค๋ฆฝ๋๋ค.
k get ipaddresspools.metallb.io -A
#
# NAMESPACE NAME AUTO ASSIGN AVOID BUGGY IPS ADDRESSES
# metallb-system k8s-svc-pool true false ["192.168.1.11-192.168.1.99"]
๋ค์ ๋จ๊ณ์
๋๋ค. ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๊ฐ arm64 ํ๊ฒฝ์์ ์ ์ ๋์ํ๋์ง ํ์ธํ๊ธฐ ์ํด sysnet4admin/chk-info
์ปจํ
์ด๋๋ฅผ ๋ํ๋ก์ด๋จผํธ๋ก ๋ฐฐํฌํ๊ณ , ์ด๋ ๊ฒ ๋ฐฐํฌํ ๋ํ๋ก์ด๋จผํธ๋ฅผ ๋ก๋๋ฐธ๋ฐ์๋ก ๋
ธ์ถํฉ๋๋ค.
k create deploy chk-info --image=sysnet4admin/chk-info
#
# deployment.apps/chk-info created
k expose deploy chk-info --type=LoadBalancer --port 80
#
# service/chk-info exposed
๋ฐฐํฌํ ๋ํ๋ก์ด๋จผํธ ํํ์ ํ๋์ ๋ก๋๋ฐธ๋ฐ์ ์๋น์ค๋ ํ์ธํฉ์๋ค.
k get po,svc
#
# NAME READY STATUS RESTARTS AGE
# pod/chk-info-5576c79965-kph92 1/1 Running 0 25s
#
# NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
# service/chk-info Load Balancer 10.104.129.5 192.168.1.11 80:31189/TCP 9s
# service/kubernetes ClusterIP 10.96.0.1 443/TCP 13m
์ ๋ง ๋ง์ง๋ง ๋จ๊ณ์
๋๋ค. ์น ๋ธ๋ผ์ฐ์ ๋ฅผ ๋์ฐ๊ณ ๋ก๋๋ฐธ๋ฐ์ IP์ธ 192.168.1.11
์ ์
๋ ฅํด ๋ด
์๋ค. ์๋์ ์ ์ฌํ ๊ฒฐ๊ณผ๊ฐ ๋์ค์
จ๋์?
์๋ฌด ๋ฌธ์ ์๋์? ์ด์ ์ฌ๋ฌ๋ถ๋ arm64 ํ๊ฒฝ์์ ๋์ํ๋ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ๊ตฌ์ถํ ๊ฒ์ ๋๋ค!
๋ง์น๋ฉฐ
์ง๊ธ๊น์ง ๋ฒ ์ด๊ทธ๋ฐํธ์ VM์จ์ด ํจ์ ์ ํ์ฉํด ๋งค์ฐ ์์ฝ๊ฒ arm64 ๊ธฐ๋ฐ ์ฟ ๋ฒ๋คํฐ์ค ํด๋ฌ์คํฐ๋ฅผ ๊ตฌ์ถํด ๋ณด์์ต๋๋ค. ๊ธ์์๋ ๋ฏธ๋ฆฌ ์์ฑํ Vagrantfile๊ณผ ์ฌ๊ธฐ์์ ํธ์ถํ ๋ด์ฉ์ผ๋ก ์์ฝ๊ฒ ๊ตฌํํ๋๋ฐ์. ์ด๋ ์ฌ์ฉํ ์คํฌ๋ฆฝํธ ํ์ผ์ ๋ ๋ฉด๋ฐํ๊ฒ ์ดํดํ๋ค๋ฉด, ์ฟ ๋ฒ๋คํฐ์ค๋ฅผ ๊น์ด ์๊ฒ ํ์ตํ ๋ ํฐ ๋์์ด ๋ ๊ฒ์ ๋๋ค.
์๊ฐ ์ฌ์ ๊ฐ ์์ ๋, (์์ด๋ ๋ผ ์ ์์ผ๋ฉด ์ข๊ฒ ์ง๋ง์) ์ด๋ ๊ฒ ํธ์ถํ ์คํฌ๋ฆฝํธ์ ์ฃผ์์ ๋ณด๊ณ ์ฟ ๋ฒ๋คํฐ์ค๋ฅผ ๊น์ด ์ดํดํด ๋ณด๋ ๊ฒ์ ์ด๋จ๊น์?