List Pods with SidecarGateway selectors

As described in CR SidecarGateway, the podSelector in SidecarGateway selects the Pods the SidecarGateway should be applied to.

Verify which Pods are selected

Follow the instructions below to verify which Pods are selected by the podSelector in SidecarGateway.

  1. To list the matching Pods, run:
  2. copy
    kubectl describe sidecargateways.microgateway.airlock.com

    Example output:

    copy
    kubectl describe sidecargateways.microgateway.airlock.com webapp
    ...
    ...
    Status: 
      Conditions: 
        Last Transition Time:  2022-09-13T13:30:20Z 
        Status:                True 
        Type:                  ConfigReferencesLoaded 
        Last Transition Time:  2022-09-13T13:30:20Z 
        Status:                True 
        Type:                  PodsSelected 
        Last Transition Time:  2022-09-13T13:30:20Z 
        Status:                True 
        Type:                  EnvoyConfigSynced 
      Pods: 
        Envoy Config:  webapp-84b785f954-r49wt 
        Name:          webapp-84b785f954-r49wt 
      Status:          Active 
    Events:            <none>

    The Pods with their Name matching the labels defined in the CustomResource SidecarGateway are listed under Status.Pods. The corresponding Envoy Configurations are referenced with Envoy Config.