0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【IBM Application Gateway】再ビルドしたときのPodの状態をみてみる

Last updated at Posted at 2022-05-25

はじめに

oc start-build bc/XXX コマンドで再ビルドしたときのPODの状態遷移についてみてみました。

1.DeploymentConfigの設定確認

ローリングデプロイメントになっていることを確認します。

spec:
  replicas: 2
  revisionHistoryLimit: 10
  selector:
    name: iag
  strategy:
    activeDeadlineSeconds: 21600
    resources: {}
    rollingParams:
      intervalSeconds: 1
      maxSurge: 25%
      maxUnavailable: 25%
      timeoutSeconds: 600
      updatePeriodSeconds: 1
    type: Rolling

2. 再ビルドしたときのPodの状態を確認

最初の状態です。

> oc get pods
NAME           READY   STATUS      RESTARTS   AGE
iag-1-build    0/1     Completed   0          48d
iag-1-ctwlr    1/1     Running     0          5h7m
iag-1-deploy   0/1     Completed   0          48d
iag-1-lx2w6    1/1     Running     0          48d

Podの状態を確認するため以下のコマンドを実行しておきます。

> oc get pods -w

再ビルドします。

> oc start-build bc/iag -F

Podの状態遷移を確認します。

> oc get pods -w
NAME           READY   STATUS      RESTARTS   AGE
iag-1-build    0/1     Completed   0          48d
iag-1-ctwlr    1/1     Running     0          5h9m
iag-1-deploy   0/1     Completed   0          48d
iag-1-lx2w6    1/1     Running     0          48d
iag-2-build    0/1     Pending     0          0s
iag-2-build    0/1     Pending     0          1s
iag-2-build    0/1     Init:0/2    0          1s
iag-2-build    0/1     Init:0/2    0          2s
iag-2-build    0/1     Init:0/2    0          3s
iag-2-build    0/1     Init:0/2    0          3s
iag-2-build    0/1     Init:1/2    0          6s
iag-2-build    0/1     PodInitializing   0          7s
iag-2-build    1/1     Running           0          8s
iag-2-deploy   0/1     Pending           0          0s
iag-2-deploy   0/1     Pending           0          0s
iag-2-deploy   0/1     ContainerCreating   0          0s
iag-2-build    0/1     Completed           0          34s
iag-2-build    0/1     Completed           0          34s
iag-2-deploy   0/1     ContainerCreating   0          2s
iag-2-deploy   0/1     ContainerCreating   0          2s
iag-2-deploy   1/1     Running             0          4s
### 新しいPod(1つ目)の作成が始まる ###
iag-2-cnjdv    0/1     Pending             0          0s
iag-2-cnjdv    0/1     Pending             0          0s
iag-2-cnjdv    0/1     ContainerCreating   0          0s
iag-2-cnjdv    0/1     ContainerCreating   0          2s
iag-2-cnjdv    0/1     ContainerCreating   0          2s
iag-2-cnjdv    0/1     Running             0          5s
### 新しいPod(1つ目)が READY 1/1、STATUS Runningとなる。###
iag-2-cnjdv    1/1     Running             0          9s
### 古いPod(1つ目)が停止 ###
iag-1-lx2w6    1/1     Terminating         0          48d
iag-1-lx2w6    1/1     Terminating         0          48d
### 新しいPod(2つ目)の作成が始まる ###
iag-2-6zmxt    0/1     Pending             0          0s
iag-2-6zmxt    0/1     Pending             0          0s
iag-2-6zmxt    0/1     ContainerCreating   0          0s
iag-1-lx2w6    0/1     Terminating         0          48d
iag-2-6zmxt    0/1     ContainerCreating   0          1s
iag-2-6zmxt    0/1     ContainerCreating   0          2s
iag-2-6zmxt    0/1     ContainerCreating   0          3s
iag-2-6zmxt    0/1     Running             0          5s
iag-1-lx2w6    0/1     Terminating         0          48d
iag-1-lx2w6    0/1     Terminating         0          48d
### 新しいPod(2つ目)が READY 1/1、STATUS Runningとなる。###
iag-2-6zmxt    1/1     Running             0          14s
### 古いPod(1つ目)が停止 ###
iag-1-ctwlr    1/1     Terminating         0          5h11m
iag-1-ctwlr    1/1     Terminating         0          5h11m
iag-1-ctwlr    0/1     Terminating         0          5h11m
iag-2-deploy   0/1     Completed           0          33s
iag-2-deploy   0/1     Completed           0          33s

最後に

再デプロイしたときのPodの状態遷移について確認してみました。

参考にさせて頂いた情報を記載しておきます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?