VBox 노드 구축

SangYeon Min·2023년 11월 2일
0

STUDY-K8s

목록 보기
2/7
post-thumbnail

VM Ubuntu 환경 구축

OS: ubuntu-20.04.6-desktop-amd64.iso

네트워크 어댑터 설정

어댑터 1번에 NAT, 어댑터 2번에 호스트 전용 네트워크 어댑터를 설정
https://superuser.com/questions/1643911/virtualbox-vm-not-assigning-ip-to-second-network-adapter

SSH 접속 관련 설정

apt-get update

# ifconfig, netstat 사용
apt install net-tools

# openssh 패키지 설치
sudo apt-get install openssh-server -y

이후 sshd_config 파일 수정

nano /etc/ssh/sshd_config

# 주석을 제거하여 config 세팅
Port 22
PermitRootLogin yes
PasswordAuthentication yes

#이후 sshd 재시작
sudo systemctl restart sshd

방화벽 22번 포트 허용

sudo ufw disable
ufw allow 22
ufw allow 6443 #kubeadm join을 위한 포트 허용
sudo ufw enable
sudo ufw status

이후 iconfig의 enp0s8의 inet 주소 (192.xxx.xxx.xxx)로 ssh 접속
추가적으로 모든 세팅이 끝난 후에는 worker node 할당 메모리를 줄여주면 된다


Trouble Shooting

Terminal 열기 불가 오류

터미널을 실행할 때 위와 같이 로딩만 돌아가고 터미널이 열리지 않는 문제 발생
이는 인코딩 관련 VM 문제로 아래와 같이 English를 다른 언어로 변경해주면 해결

0개의 댓글