쿠버네티스 입문기 (2)
포스트
취소

쿠버네티스 입문기 (2)

다음으로는 쿠버네티스 운영에 도움을 주는 도구들을 설치합니다.

1.helm

helm은 쿠버네티스의 페키지 메니저 도구 입니다. 자세한건 써봐야 할것 같으니 넘어가고 버전은 v3.7.1 버전을 설치 하였습니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// CLUSTER

$ helm help
The Kubernetes package manager

Common actions for Helm:

- helm search:    search for charts
- helm pull:      download a chart to your local directory to view
- helm install:   upload the chart to Kubernetes
- helm list:      list releases of charts
.
.
.

2.Kustomize

Kustomize 또한 쿠버네티스의 페키지 메니저 도구 입니다. 역시나 사용해보지 않고는 모르니… 3.10.0 버전을 설치 하였습니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// CLUSTER

$ kustomize help

Manages declarative configuration of Kubernetes.
See https://sigs.k8s.io/kustomize

Usage:
  kustomize [command]

Available Commands:
  build                     Print configuration per contents of kustomization.yaml
  cfg                       Commands for reading and writing configuration.
  completion                Generate shell completion script
  create                    Create a new kustomization in the current directory
  edit                      Edits a kustomization file
  fn                        Commands for running functions against configuration.
  help                      Help about any command
  version                   Prints the kustomize version
.
.
.

3. 볼륨 플러그인

상황에 따라서 컨테이너는 데이터를 보관하고 있어야 합니다. 볼륨 플러그인을 사용하면 컨테이너가 사라지거나 이동해도 데이터를 유지할 수 있습니다. (컨테이너의 volume으로 엮을 수 있는 공간을 제공하는 플러그인 정도로 이해하고 넘어갔습니다.)

쿠버네티스에서는 사용가능한 볼륨 플러그인들이 많이 있습니다.

여기서는 잘 모르니 모두의 MLOps 에서 사용하는 csi를 설치해 보았습니다.

1
2
3
// CLUSTER

kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.20/deploy/local-path-storage.yaml

이것을 default storage class로 지정할 수 있습니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// CLUSTER

// 지정전
$ kubectl get sc
NAME         PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path   rancher.io/local-path   Delete          WaitForFirstConsumer   false                  2m41s

// default 지정
$ kubectl patch storageclass local-path  -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

// 지정 후
$ kubectl get sc
NAME                   PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-path (default)   rancher.io/local-path   Delete          WaitForFirstConsumer   false                  3m10s
이 기사는 저작권자의 CC BY 4.0 라이센스를 따릅니다.

쿠버네티스 입문기 (1)

쿠버네티스 입문기 (3)