Kubernetes

[Kubernetes] Kubernetes + Kubesphere 구축하기 - On Linux 설치편

IT-PAPA 2023. 7. 23. 06:22
반응형

설치 사이트

All-in-One Installation of Kubernetes and KubeSphere on Linux

All-in-One Installation of Kubernetes and KubeSphere on Linux

Install KubeSphere on Linux with a minimal installation package. The tutorial serves as a basic kick-starter for you to understand the container platform, paving the way for learning the following guides.

www.kubesphere.io

 

1. 리눅스 환경 구축

통합형 설치를 시작하려면 하드웨어 및 운영 체제에 대한 다음 요구 사항에 따라 하나의 호스트만 준비하면 됩니다.

하드웨어 권장 사항

운영 체제최소 요구 사항

우분투 16.04, 18.04, 20.04, 22.04CPU 코어 2개, 메모리 4GB 및 디스크 공간 40GB
데비안 버스터스트레치CPU 코어 2개, 메모리 4GB 및 디스크 공간 40GB
CentOS 7.x 버전CPU 코어 2개, 메모리 4GB 및 디스크 공간 40GB
레드햇 엔터프라이즈 리눅스 7CPU 코어 2개, 메모리 4GB 및 디스크 공간 40GB
SUSE Linux Enterprise Server 15/openSUSE Leap 15.2CPU 코어 2개, 메모리 4GB 및 디스크 공간 40GB

 

노드 요구사항

ssh, sudo / curl / openssl / tar 사용
 

2. KubeKey 다운로드 및 실행 권한 부여

curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.7 sh -
chmod +x kk

 

3. Kubernetes 와 Kubesphere 설치

# 버전 정보 지정
./kk create cluster --with-kubernetes v1.26.0 --with-kubesphere v3.3.2

# 버전을 지정하지 않으면 kubernetes는 1.23.10, kubesphere는 최신버전으로 설치
./kk create cluster --with-kubernetes --with-kubesphere

Kubernetes 설치 가능 버전 확인

./kk version --show-supported-k8s

설치 시 conntrack 과 socat 설치는 필수 패키지

root@dev-m1-k8s:~# ./kk create cluster --with-kubernetes --with-kubesphere


 _   __      _          _   __           
| | / /     | |        | | / /           
| |/ / _   _| |__   ___| |/ /  ___ _   _ 
|    \| | | | '_ \ / _ \    \ / _ \ | | |
| |\  \ |_| | |_) |  __/ |\  \  __/ |_| |
\_| \_/\__,_|_.__/ \___\_| \_/\___|\__, |
                                    __/ |
                                   |___/

11:50:44 UTC [GreetingsModule] Greetings
11:50:44 UTC message: [dev-m1-k8s]
Greetings, KubeKey!
11:50:44 UTC success: [dev-m1-k8s]
11:50:44 UTC [NodePreCheckModule] A pre-check on nodes
11:50:44 UTC success: [dev-m1-k8s]
11:50:44 UTC [ConfirmModule] Display confirmation form
+------------+------+------+---------+----------+-------+-------+---------+-----------+--------+----------+-------------------------+------------+-------------+------------------+--------------+
| name       | sudo | curl | openssl | ebtables | socat | ipset | ipvsadm | conntrack | chrony | docker   | containerd              | nfs client | ceph client | glusterfs client | time         |
+------------+------+------+---------+----------+-------+-------+---------+-----------+--------+----------+-------------------------+------------+-------------+------------------+--------------+
| dev-m1-k8s | y    | y    | y       | y        |       |       |         |           |        | 20.10.21 | 1.6.12-0ubuntu1~22.04.3 |            |             |                  | UTC 11:50:44 |
+------------+------+------+---------+----------+-------+-------+---------+-----------+--------+----------+-------------------------+------------+-------------+------------------+--------------+
11:50:44 UTC [ERRO] dev-m1-k8s: conntrack is required.
11:50:44 UTC [ERRO] dev-m1-k8s: socat is required.

This is a simple check of your environment.
Before installation, ensure that your machines meet all requirements specified at
https://github.com/kubesphere/kubekey#requirements-and-recommendations

[Notice]
Incorrect runtime. Please specify a container runtime other than Docker to install Kubernetes v1.24 or later.
You can set "spec.kubernetes.containerManager" in the configuration file to "containerd" or add "--container-manager containerd" to the "./kk create cluster" command.
For more information, see:
https://github.com/kubesphere/kubekey/blob/master/docs/commands/kk-create-cluster.md
https://kubernetes.io/docs/setup/production-environment/container-runtimes/#container-runtimes
https://kubernetes.io/blog/2022/02/17/dockershim-faq/

 

4. 인스톨 검증 확인

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f
설치 완료 화면
설치 완료 화면

 

5. 설치 완료 시 Webconsole URL 및 초기계정

http://[VM IP]:30880
Account : admin
Password : P@88w0rd
webconsole URL 화면
webconsole URL 화면
비밀번호 변경 화면
비밀번호 변경 화면
로그인 후 메인 화면
로그인 후 메인 화면
kubesphere 메인 화면
kubesphere 메인 화면

 

- Kubesphere 삭제 - 아래 github 의 scripts/kubesphere-delete.sh 내용을 실행하도록 한다.

ks-installer/scripts/kubesphere-delete.sh at master · kubesphere/ks-installer (github.com)
 

728x90
반응형
LIST