27.3 访问 Pod

执行以下步骤访问 Azure 中的 Pod:

  1. 登录到 Azure 门户。

  2. 单击 。

  3. 运行以下命令识别 Pod 的名称:

    kubectl get pods --watch -n <namespace>

    例如:

    kubectl get pods --watch -n idm

  4. 运行以下命令:

    kubectl exec -it -n idm <pod-name> bash

    例如:

    kubectl exec -it -n idm userapp-d54f98b58-qcpmz bash