본문으로 바로가기

[RHOCP4] RHEL8 worker 노드 추가

category Cloud/RedHat - OpenShift 2022. 2. 5. 09:01
반응형

RHOCP Cluster에 RHEL8 (8.4) worker node 추가 방법에 대한 내용입니다.

 

기존에 사용했던 방법은 동일하지만, RHEL7과는 다른 Repo를 활성화해야하는 항목만 변경되었습니다.

 

 

sub등록 및 필요한 repo 활성화

[root@worker3 ~]# subscription-manager register --username=<user id> --password=<passwd>

[root@worker3 ~]# subscription-manager refresh
You are attempting to use a locale: "ko_KR.UTF-8" that is not fully supported by this system.
로컬 데이터가 모두 재생되었습니다

[root@worker3 ~]# subscription-manager list --available --matches '*OpenShift*'
You are attempting to use a locale: "ko_KR.UTF-8" that is not fully supported by this system.

[root@worker3 ~]# subscription-manager attach --pool=xxxxxxx
You are attempting to use a locale: "ko_KR.UTF-8" that is not fully supported by this system.
서브스크립션을 제대로 첨부했습니다: Red Hat OpenShift Platform Plus (Bare Metal Node), Standard (1-2 sockets, NFR, Partner Only)


[root@worker3 ~]# subscription-manager repos --disable="*"
You are attempting to use a locale: "ko_KR.UTF-8" that is not fully supported by this system.


[root@worker3 yum.repos.d]# subscription-manager repos \
>     --enable="rhel-8-for-x86_64-baseos-rpms" \
>     --enable="rhel-8-for-x86_64-appstream-rpms" \
>     --enable="rhocp-4.9-for-rhel-8-x86_64-rpms" \
>     --enable="fast-datapath-for-rhel-8-x86_64-rpms"


[root@worker3 yum.repos.d]# systemctl disable firewalld --now

 

 

1. hosts 파일작성

###############################################################################
# Required configuration variables                                            #
###############################################################################
#openshift_kubeconfig_path="~/.kube/config"
openshift_kubeconfig_path="/root/ocp/config/auth/kubeconfig"


# For running RHEL worker scaleup
[new_workers]
worker3.ocp-dc.hk.com ansible_host=55.55.35.218

 

 

2. scaleup.yml 실행

[root@bastion inventory]#ansible-playbook -i hosts ../playbooks/scaleup.yml

 

 

3. 노드 조인 및 정보 확인

ansible을 통해 자동으로 노드에 추가할 수 있도록 approve까지 진행해준다.

 

[root@bastion inventory]#oc get node
NAME                    STATUS   ROLES    AGE   VERSION
infra1.ocp-dc.hk.com    Ready    infra    21d   v1.22.0-rc.0+894a78b
infra2.ocp-dc.hk.com    Ready    infra    21d   v1.22.0-rc.0+894a78b
master1.ocp-dc.hk.com   Ready    master   21d   v1.22.0-rc.0+894a78b
master2.ocp-dc.hk.com   Ready    master   21d   v1.22.0-rc.0+894a78b
master3.ocp-dc.hk.com   Ready    master   21d   v1.22.0-rc.0+894a78b
worker1.ocp-dc.hk.com   Ready    worker   21d   v1.22.0-rc.0+894a78b
worker2.ocp-dc.hk.com   Ready    worker   21d   v1.22.0-rc.0+894a78b
worker3.ocp-dc.hk.com   Ready    worker   97m   v1.22.3+e790d7f
728x90