KubeSphere All-in-One 모드 설치 가이드

설치 개요

본 가이드는 Linux 환경에서 KubeSphere를 All-in-One 모드로 설치하는 과정을 설명합니다. Ubuntu 22.04 LTS 64비트 환경에서의 설치를 기준으로 하며, 설치 전 시스템 요구사항을 확인해야 합니다.

사전 요구사항

1. Docker 설치

컨테이너 런타임 환경인 Docker를 먼저 설치해야 합니다. 두 가지 설치 방법을 제공합니다.

방법 1: 자동 스크립트 사용

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

방법 2: 수동 설치

# 시스템 패키지 업데이트 및 의존성 도구 설치
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
# Docker 저장소 GPG 키 추가
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Docker APT 저장소 등록
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# Docker 최신 버전 설치
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

2. Python 링크 설정

KubeSphere 설치 스크립트는 Python을 필요로 합니다. 시스템에 Python이 설치되어 있는지 확인하고, 심볼릭 링크를 생성합니다.

ln -s /usr/bin/python3 /usr/bin/python

3. 필수 의존성 패키지 설치

설치 과정에서 필요한 네트워크 및 시스템 도구를 설치합니다.

apt install ansible chrony socat conntrack ebtables ipset

설치 단계

1. 설치 파일 다운로드 및解压

공식 웹사이트에서オフライン 설치 패키지를 다운로드합니다.

다운로드 URL: https://kubesphere.io/download/offline/latest

또는 curl 명령어를 사용하여 직접 다운로드:

curl -L https://kubesphere.io/download/offline/latest > kubesphere-all-offline-v2.1.1.tar.gz

다운로드 완료 후 압축을 해제합니다.

tar -zxf kubesphere-all-offline-v2.1.1.tar.gz

2. 노드 구성 (멀티노드 설치 시)

단일 노드 설치의 경우 이 단계를 건너뛰고, 클러스터 모드로 설치하려면 conf/hosts.ini 파일을 편집합니다.

[all]
master ansible_connection=local  ip=192.168.0.1
worker01 ansible_host=192.168.0.2 ip=192.168.0.2 ansible_ssh_pass=PASSWORD
worker02 ansible_host=192.168.0.3 ip=192.168.0.3 ansible_ssh_pass=PASSWORD

[local-registry]
master

[kube-master]
master

[kube-node]
worker01
worker02

[etcd]
master

[k8s-cluster:children]
kube-node
kube-master

3. 추가 컴포넌트 활성화 (선택사항)

최소 설치가 아닌 전체 기능을 사용하려면 conf/common.yaml 파일에서 컴포넌트를 활성화합니다.

openpitrix_enabled: true        # KubeSphere 애플케이션 스토어
metrics_server_enabled: true    # 수평 파드 자동 스케일러 (HPA)
servicemesh_enabled: true       # 서비스 메시 기능
notification_enabled: true      # 알림 시스템
alerting_enabled: true          # 경보 시스템

4. 설치 실행

루트 권한으로 설치 스크립트를 실행합니다.

cd scripts
./install.sh

스크립트 실행 시 설치 모드 선택 화면이 나타납니다. All-in-One 설치를 위해서는 1을 입력하면 자동으로 설치가 시작됩니다.

태그: kubesphere kubernetes DevOps container-orchestration ubuntu

7월 1일 18:41에 게시됨