/
11-2 centos로 세팅

11-2 centos로 세팅

기존의 VM을 모두 halt 시키고 작업

$ vagrant global-status | grep virtualbox | awk '{ print "vagrant halt -f " $1}' | sh -v

centos로 새로 환경 만들기

2024_k8s가 아닌 새로운 위치에서 작업 git clone https://github.com/osci-khoj/2024_k8s.git cd 2024_k8s/centos vagrant up ---모두 설치된 후 ------------------------------------ vagrant ssh-config > ~/.ssh/config ssh m-k8s sudo -i

 

초기세팅값

kubectl create ns metallb-system kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.11/config/manifests/metallb-native.yaml cd 2024_k8s/centos/edu kubectl apply -f metallb-ipaddresspool.yaml

nfs -csi 세팅

worker2번 노드에 nfs서버를 임시로 구성

nfs-utils 패키지를 설치 합니다 yum install -y nfs-utils nfs 공유로 사용할 폴더를 생성하고 테스트에 사용할 index.html 파일을 생성합니다 mkdir /nfs chmod 777 /nfs echo "hihihi" > /nfs/index.html nfs공유 설정을 해줍니다 cat <<EOF | tee /etc/exports /nfs *(rw,no_root_squash) EOF nfs서버 서비스를 실행하고 활성화 합니다 systemctl enable nfs-server --now Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service. 확인 [root@w2-k8s ~]# exportfs /nfs w2-k8s nfs설정이 정상인지 worker1번에서 마운트 하여 테스트 합니다 ssh w1-k8s yum install nfs-utils -y (모든워커/마스터 노드에서 수행) mkdir /nfs mount w2-k8s:/nfs /nfs df -h Filesystem Size Used Avail Use% Mounted on ..... 192.168.1.102:/nfs 38770304 4569856 34200448 12% /nfs ..... [root@w1-k8s /]# ll /nfs total 4 -rw-r--r--. 1 root root 6 Sep 13 12:47 index.html nfs서버가 정상 작동되는것을 확인 했으니 이제 실습을 진행 합니다 /nfs 폴더를 umount 해줍니다 umount /nfs 이제 설정이 완료된 nfs볼륨을 이용하여 pod를 생성하여 줍니다

 

이번 실습은 동적 프로비저닝으로 nfs를 가지고 실습합니다.

deployment.yaml

이제 적용이 다되었습니다.

 

 

 


 

Helm 설치

 

Related content

13-1 Helm을 이용한 복잡한 APP 배포
13-1 Helm을 이용한 복잡한 APP 배포
Read with this
14. 애플리케이션 배포(CD)
14. 애플리케이션 배포(CD)
Read with this
1. 쿠버네티스 실습환경 구축
1. 쿠버네티스 실습환경 구축
Read with this
6. 쿠버네티스 서비스/네트워크
6. 쿠버네티스 서비스/네트워크
Read with this
8. 쿠버네티스 리소스 관리 및 볼륨
8. 쿠버네티스 리소스 관리 및 볼륨
Read with this