티스토리 뷰

Cloud/Cloud Native

Octant

Jacob_baek 2020. 10. 2. 22:32

Octant 란?

Octant의 경우 개발자가 Web UI를 통해 복잡성을 가진 kubernetes 관리할수 있도록 하는 웹 기반 플랫폼이다.
여기서 주목해야 할 것은 개발자 입장에서 좀더 쉽게 kubernetes를 관리 및 사용할수 있도록 돕는것이다.
하여 개발자의 입장에서 만들어진 것이라 여겨져 생각보다는(개인적인 판단임으로 참고만) UI 상의 퀄리티가 좋지는 않다.

How to use

동작방식은 octant가 동작될 localhost에 octant binary를 다운로드 받아 실행되기 때문에 개발 머신에서 사용하는것을 권장한다.

(실제 목적 자체가 개발자용이기에 개발가능한 IDE를 사용하는 환경이 더 좋을것이라 판단된다.)

또한 octant가 동작될 환경에서 저장되어 있는 kubeconfig 파일을 참조하여 context부터 각종 resource를 불러오기 때문에 이에 대한 설정이 기존에 되어 있어야 한다. 즉, .kube/config 내에 필요한 context 정보가 사전에 추가되어 있어야 한다.

참고로 필자는 lens(github.com/lensapp/lens)를 사용하고 있는데 lens는 copy&paste로 추가해 놓지 않은 context도 연결할수 있기에 아쉬운 부분중 하나라 판단된다. (개인의견)

binary 실행으로 간단히 실행할 수 있다.

jacob@jacob-laptop:~$ octant
2020-10-03T17:17:01.826+0900    INFO    dash/watcher.go:116    watching config file    {"component": "config-watcher", "config": "/home/jacob/.kube/config"}
2020-10-03T17:17:01.827+0900    INFO    module/manager.go:83    registering action    {"component": "module-manager", "actionPath": "action.octant.dev/apply", "module-name": "overview"}
...

이후 기본 port인 localhost:7777로 default web browser가 자동 실행되어 접속된 화면을 출력한다.

포트 변경 및 kubeconfig/context 지정 등 다양한 옵션을 함께 사용할 수 있다.

jacob@jacob-laptop:~$ octant --help
octant is a dashboard for high bandwidth cluster analysis operations

Usage:
  octant [flags]
  octant [command]

Available Commands:
  help        Help about any command
  version     Show version

Flags:
      --context string                 initial context
      --disable-cluster-overview       disable cluster overview
      --enable-feature-applications    enable applications feature
      --kubeconfig string              absolute path to kubeConfig file
  -n, --namespace string               initial namespace
      --namespace-list strings         a list of namespaces to use on start
      --plugin-path string             plugin path
  -v, --verbose                        turn on debug logging
      --client-max-recv-msg-size int   client max receiver message size (default 16777216)
      --accepted-hosts string          accepted hosts list [DEV]
      --client-qps float32             maximum QPS for client [DEV] (default 200)
      --client-burst int               maximum burst for client throttle [DEV] (default 400)
      --disable-open-browser           disable automatic launching of the browser [DEV]
  -c, --enable-opencensus              enable open census [DEV]
      --klog-verbosity int             klog verbosity level [DEV]
      --listener-addr string           listener address for the octant frontend [DEV]
      --local-content string           local content path [DEV]
      --proxy-frontend string          url to send frontend request to [DEV]
      --ui-url string                  dashboard url [DEV]
      --browser-path string            the browser path to open the browser on
  -h, --help                           help for octant

How to install

설치는 다음과 같이 대다수 OS(windows, Mac OS, Linux를 일컫음)에서 설치하여 사용 가능하다.

참고
현시점(2020.10)에는 0.16 버전이 최신이라 아래 화면들은 0.16버전을 기반으로 캡처되었다.

Features

  • YAML apply

  • Resource Viewer

    killing feature라고도 표현한 곳이 있었다.
    즉 resource 들의 의존관계를 보여주는 기능이 나름 octant에서 괜찮은 기능으로 보인다.

  • Summary view

  • Port Forward

    여기서 START PORT FORWARD 버튼을 누르면

    PORT FORWARD가 손쉽게 설정되고 외부 접근이 가능해진다.

  • Log Stream

  • Label Filter

  • Cluster Navigator

  • Plugin System

    plugin중 몇가지를 아래에서 소개하도록 하겠다.

octant-plugin

현시점(2020.10)에 약 13개의 plugin이 존재한다.

How to use

기본 path (/home/user/.config/octant/plugins/) 나 다른 경로에 관련된 plugin binary를 다운로드 받아 놓으면
octant 실행시 자동/수동으로 로드할수 있다.

helm plugin

helm plugin을 설치해서 octant ui에서 사용해보자.
아래와 같이 특정한 디렉토리(기본 path상 octant plugin directory)에 plugin binary를 다운로드 받아

jacob@jacob-laptop:~$ curl -L https://github.com/bloodorangeio/octant-helm/releases/download/v0.1.0/octant-helm_0.1.0_linux_amd64.tar.gz | \
>   tar xz -C ~/.config/octant/plugins/ octant-helm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   662  100   662    0     0   1880      0 --:--:-- --:--:-- --:--:--  1875
100 10.3M  100 10.3M    0     0  2586k      0  0:00:04  0:00:04 --:--:-- 3763k
jacob@jacob-laptop:~$ ls .config/octant/plugins/
octant-helm

octant를 실행해보자.

jacob@jacob-laptop:~$ octant 
2020-10-03T16:52:16.878+0900    INFO    dash/watcher.go:116    watching config file    {"component": "config-watcher", "config": "/home/jacob/.kube/config"}
...
2020-10-03T16:52:16.890+0900    INFO    plugin/manager.go:372    watching for new JavaScript plugins in ["/home/jacob/.config/octant/plugins"]
2020-10-03T16:52:16.944+0900    INFO    plugin/manager.go:647    registered plugin "helm"    {"plugin-name": "octant-helm", "cmd": "/home/jacob/.config/octant/plugins/octant-helm", "metadata": {"Name":"helm","Description":"Helm support (v3)","Capabilities":{"IsModule":true}}}
2020-10-03T16:52:16.944+0900    INFO    plugin/manager.go:655    plugin supports navigation    {"plugin-name": "octant-helm"}
2020-10-03T16:52:17.285+0900    INFO    dash/dash.go:596    using api service
2020-10-03T16:52:17.286+0900    INFO    dash/dash.go:505    Dashboard is available at http://127.0.0.1:7777

helm의 관리 기능

  • 간단한 helm list 명령어의 결과

  • helm get note 의 결과

  • 그외 helm upgrade 및 install 등에 대한 기능은 부재
    (개인적으로 lens를 사용해본 경험을 비교하자면 많이 아쉬운 기능임)

참고사항
octant-helm은 우선 helm 3 이상을 지원한다. 즉, tiller 기반의 helm 2.x에서는 동작되지 않는다. 테스트시에도 관련 list 를 가져오지 못하였다. helm 3(실제 테스트 버전은 v3.3.4로는 list 호출이 정상적으로 이루어졌다.
또한 octant-helm은 현시점에서 약 11개월전 업데이트가 안되고 있어 정상적으로 동작하는지 여부는 각자 확인이 필요하다.

Jeknins X plugin

WIP...

Starboard plugin

개인의견
관리를 위한 UI로는 아쉬움이 좀 있지만 실제 발현된 목적인 개발자 입장의 도구로써는 괜찮은 솔루션이 될수 있다.
Jenkins X, starboard와 연동하여 DevOps 측면에서 CICD pipeline을 만든다면 보안취약점 분석부터 자동화된 빌드/배포가
이루어질수 있기에 꽤 괜찮은 도구가 될것이라 생각된다.

'Cloud > Cloud Native' 카테고리의 다른 글

Metallb on Minikube  (0) 2020.10.27
starboard  (0) 2020.10.03
nginx ingress with namespace  (0) 2020.08.24
Make Helm chart repo  (0) 2020.07.23
Accident for deleting pvc  (0) 2020.06.23
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함