IBM Kubernetes Service GUI 操作 (Deployment を Scale)


はじめに

IKS (IBM Cloud Kubernetes Service) は Kubernetes Dashboard で コンソール上での操作も可能です。

IBM Cloud Docs の IKS の内容を眺めていると、GUI が使えるということを認識しにくく、GUI で Scaleなどの操作を行うということにわたし自身が気づくのが遅かったので、(当たり前と言えば当たり前ですが) そういえば IKS 操作は GUI も使えますよ、という意味合いで当記事でメモしておきます。


環境

・ IBM Cloud Kubernetes Service (無料クラスターを使用)


準備

1) IKS にテスト用の Deployment (testpod.yaml) を適用。

testpod.yaml の内容は以下。

testpod.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: testpod
spec:
  replicas: 1
  selector:
    matchLabels:
      app: testpod
  template:
    metadata:
      labels:
        app: testpod
    spec:
      containers:
      - name: testpod
        image: nginx

IKS にCLIで接続して適用。

$ kubectl apply -f testpod.yaml
deployment.apps/testpod created
$ kubectl get deployment
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
testpod   1/1     1            1           67s

GUI で操作

IBM Cloud のコンソールにログインし、対象のクラスターの画面へ移動。

Kubernetes ダッシュボードを押します。

Deployments に testpod (1/1) が存在することを確認。

右側の・・・を選択肢、「Scale」 を押します。

Derised replicas を 1 -> 2 に。

Pods が正しく 2つになりました。

次は 0 にします。

Deployments は 0/0 に。

$ kubectl get deployments
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
testpod   0/0     0            0           36m

Pods も無くなりました。

$ kubectl get po
No resources found in default namespace.

GUI だとコンポーネントが一覧で見えるのでわかりやすくて良いですね。

以上です。ご参考まで。