LoginSignup
0
0

More than 3 years have passed since last update.

IBM Kubernetes Service GUI 操作 (Deployment を Scale)

Last updated at Posted at 2021-02-25
はじめに

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 ダッシュボードを押します。

図1.jpg

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

1.png

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

Derised replicas を 1 -> 2 に。

3.png

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

4.png

次は 0 にします。

5.png

Deployments は 0/0 に。

6.png

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

Pods も無くなりました。

7.png

$ kubectl get po
No resources found in default namespace.

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

以上です。ご参考まで。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0