第12章 Red Hat ビルドの Kogito マイクロサービスのデプロイメントのトラブルシューティング
Operator を使用して Red Hat ビルドの Kogito マイクロサービスをデプロイする時に発生する可能性のある問題のトラブルシューティングを行うには、本セクションの情報を使用します。以下の情報は、新しい問題および回避策が検出されるたびに更新されています。
- 実行中のビルドがない
実行中のビルドや関連する namespace で作成されたリソースが表示されない場合は、以下のコマンドを実行して実行中の Pod を取得し、Pod の Operator ログを表示します。
指定の Pod に関する RHPAM Kogito Operator ログの表示
// Retrieves running pods $ oc get pods NAME READY STATUS RESTARTS AGE kogito-operator-6d7b6d4466-9ng8t 1/1 Running 0 26m // Opens RHPAM Kogito Operator log for the pod $ oc logs -f kogito-operator-6d7b6d4466-9ng8t
// Retrieves running pods $ oc get pods NAME READY STATUS RESTARTS AGE kogito-operator-6d7b6d4466-9ng8t 1/1 Running 0 26m // Opens RHPAM Kogito Operator log for the pod $ oc logs -f kogito-operator-6d7b6d4466-9ng8t
Copy to Clipboard Copied! KogitoRuntime
のステータスを確認します。たとえば、以下の YAML 定義を使用して、存在しないイメージを含めて
KogitoRuntime
アプリケーションを作成します。KogitoRuntime
アプリケーションの YAML 定義の例apiVersion: rhpam.kiegroup.org/v1 # Red Hat build of Kogito API for this microservice kind: KogitoRuntime # Application type metadata: name: example # Application name spec: image: 'not-existing-image:latest' replicas: 1
apiVersion: rhpam.kiegroup.org/v1 # Red Hat build of Kogito API for this microservice kind: KogitoRuntime # Application type metadata: name: example # Application name spec: image: 'not-existing-image:latest' replicas: 1
Copy to Clipboard Copied! bash コンソールで
oc describe KogitoRuntime example
コマンドを使用して、KogitoRuntime
アプリケーションのステータスを確認できます。bash コンソールでoc describe KogitoRuntime
サンプルコマンドを実行すると、以下の出力が表示されます。KogitoRuntime
ステータスの例oc describe KogitoRuntime example
[user@localhost ~]$ oc describe KogitoRuntime example Name: example Namespace: username-test Labels: <none> Annotations: <none> API Version: rhpam.kiegroup.org/v1 Kind: KogitoRuntime Metadata: Creation Timestamp: 2021-05-20T07:19:41Z Generation: 1 Managed Fields: API Version: rhpam.kiegroup.org/v1 Fields Type: FieldsV1 fieldsV1: f:spec: .: f:image: f:replicas: Manager: Mozilla Operation: Update Time: 2021-05-20T07:19:41Z API Version: rhpam.kiegroup.org/v1 Fields Type: FieldsV1 fieldsV1: f:spec: f:monitoring: f:probes: .: f:livenessProbe: f:readinessProbe: f:resources: f:runtime: f:status: .: f:cloudEvents: f:conditions: Manager: main Operation: Update Time: 2021-05-20T07:19:45Z Resource Version: 272185 Self Link: /apis/rhpam.kiegroup.org/v1/namespaces/ksuta-test/kogitoruntimes/example UID: edbe0bf1-554e-4523-9421-d074070df982 Spec: Image: not-existing-image:latest Replicas: 1 Status: Cloud Events: Conditions: Last Transition Time: 2021-05-20T07:19:44Z Message: Reason: NoPodAvailable Status: False Type: Deployed Last Transition Time: 2021-05-20T07:19:44Z Message: Reason: RequestedReplicasNotEqualToAvailableReplicas Status: True Type: Provisioning Last Transition Time: 2021-05-20T07:19:45Z Message: you may not have access to the container image "quay.io/kiegroup/not-existing-image:latest" Reason: ImageStreamNotReadyReason Status: True Type: Failed
Copy to Clipboard Copied! 出力の最後に、
KogitoRuntime
ステータスと該当するメッセージが表示されます。