OpenShift - oc command Tips - pod

OpenShift の様々な操作で使用する `oc` コマンドにおいて、pod 関連で思いのほか面倒と思われるものを、使用例としてご紹介します。

### Resources
```shell
$ oc explain pod.spec.containers.resources
KIND:       Pod
VERSION:    v1

FIELD: resources <ResourceRequirements>

DESCRIPTION:
    Compute Resources required by this container. Cannot be updated. More info:
    https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
    ResourceRequirements describes the compute resource requirements.

FIELDS:
  claims        <[]ResourceClaim>
    Claims lists the names of resources, defined in spec.resourceClaims, that
    are used by this container.

    This is an alpha field and requires enabling the DynamicResourceAllocation
    feature gate.

    This field is immutable. It can only be set for containers.

  limits        <map[string]Quantity>
    Limits describes the maximum amount of compute resources allowed. More info:
    https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

  requests      <map[string]Quantity>
    Requests describes the minimum amount of compute resources required. If
    Requests is omitted for a container, it defaults to Limits if that is
    explicitly specified, otherwise to an implementation-defined value. Requests
    cannot exceed Limits. More info:
    https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
```

```shell
$ oc get pod -o custom-columns="NAME:.metadata.name,RESOURCES:.spec.containers[].resources"
NAME                                               RESOURCES
cluster-image-registry-operator-78946d6f5b-6zmfc   map[requests:map[cpu:10m memory:50Mi]]
image-pruner-28825920-7jtdw                        map[requests:map[cpu:100m memory:256Mi]]
image-pruner-28827360-x8jg6                        map[requests:map[cpu:100m memory:256Mi]]
image-pruner-28828800-76krv                        map[requests:map[cpu:100m memory:256Mi]]
image-registry-6dfc74459d-57979                    map[requests:map[cpu:100m memory:256Mi]]
image-registry-6dfc74459d-c79vt                    map[requests:map[cpu:100m memory:256Mi]]
node-ca-2lrmv                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-2lsbt                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-2npwz                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-5dlbf                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-5xxl5                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-5z4vg                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-6tzrj                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-6v55v                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-8n6rs                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-f5f67                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-fdnwj                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-fg2w5                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-ft2gh                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-jxjj7                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-k8l9d                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-k8ldv                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-k9xgk                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-kz5nr                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-nw8mr                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-q28wd                                      map[requests:map[cpu:10m memory:10Mi]]
node-ca-sv9rz                                      map[requests:map[cpu:10m memory:10Mi]]
```

### Owner
```shell
$ oc explain pod.metadata.ownerReferences
KIND:       Pod
VERSION:    v1

FIELD: ownerReferences <[]OwnerReference>

DESCRIPTION:
    List of objects depended by this object. If ALL objects in the list have
    been deleted, this object will be garbage collected. If this object is
    managed by a controller, then an entry in this list will point to this
    controller, with the controller field set to true. There cannot be more than
    one managing controller.
    OwnerReference contains enough information to let you identify an owning
    object. An owning object must be in the same namespace as the dependent, or
    be cluster-scoped, so there is no namespace field.

FIELDS:
  apiVersion    <string> -required-
    API version of the referent.

  blockOwnerDeletion    <boolean>
    If true, AND if the owner has the "foregroundDeletion" finalizer, then the
    owner cannot be deleted from the key-value store until this reference is
    removed. See
    https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion
    for how the garbage collector interacts with this field and enforces the
    foreground deletion. Defaults to false. To set this field, a user needs
    "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will
    be returned.

  controller    <boolean>
    If true, this reference points to the managing controller.

  kind  <string> -required-
    Kind of the referent. More info:
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

  name  <string> -required-
    Name of the referent. More info:
    https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names

  uid   <string> -required-
    UID of the referent. More info:
    https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
```

```shell
$ oc get pod -o custom-columns="NAME:.metadata.name,OWNER:.metadata.ownerReferences[]"
NAME                                               OWNER
cluster-image-registry-operator-78946d6f5b-6zmfc   map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:ReplicaSet name:cluster-image-registry-operator-78946d6f5b uid:ae27831e-f958-49ac-881b-499a6311a5b0]
image-pruner-28825920-7jtdw                        map[apiVersion:batch/v1 blockOwnerDeletion:true controller:true kind:Job name:image-pruner-28825920 uid:bc33e606-0f2b-44ee-8ecc-d893b17dc851]
image-pruner-28827360-x8jg6                        map[apiVersion:batch/v1 blockOwnerDeletion:true controller:true kind:Job name:image-pruner-28827360 uid:38df199e-9e57-47eb-b246-ed763d4ce88f]
image-pruner-28828800-76krv                        map[apiVersion:batch/v1 blockOwnerDeletion:true controller:true kind:Job name:image-pruner-28828800 uid:7c2fd157-0c84-4123-b20b-7823d8fb578e]
image-registry-6dfc74459d-57979                    map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:ReplicaSet name:image-registry-6dfc74459d uid:4b755f4c-35d4-4576-b0d9-8cc22b64d5d0]
image-registry-6dfc74459d-c79vt                    map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:ReplicaSet name:image-registry-6dfc74459d uid:4b755f4c-35d4-4576-b0d9-8cc22b64d5d0]
node-ca-2lrmv                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-2lsbt                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-2npwz                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-5dlbf                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-5xxl5                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-5z4vg                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-6tzrj                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-6v55v                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-8n6rs                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-f5f67                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-fdnwj                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-fg2w5                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-ft2gh                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-jxjj7                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-k8l9d                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-k8ldv                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-k9xgk                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-kz5nr                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-nw8mr                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-q28wd                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
node-ca-sv9rz                                      map[apiVersion:apps/v1 blockOwnerDeletion:true controller:true kind:DaemonSet name:node-ca uid:18ebd408-a7fd-4d34-9ef7-5e05d86b12c3]
```

### Hostname and IP Address
```shell
$ oc explain pod.status.spec.nodeName
KIND:       Pod
VERSION:    v1

error: field "nodeName" does not exist
$ oc explain pod.spec.nodeName
KIND:       Pod
VERSION:    v1

FIELD: nodeName <string>

DESCRIPTION:
    NodeName is a request to schedule this pod onto a specific node. If it is
    non-empty, the scheduler simply schedules this pod onto that node, assuming
    that it fits resource requirements.


$ oc explain pod.status.hostIP
KIND:       Pod
VERSION:    v1

FIELD: hostIP <string>

DESCRIPTION:
    hostIP holds the IP address of the host to which the pod is assigned. Empty
    if the pod has not started yet. A pod can be assigned to a node that has a
    problem in kubelet which in turns mean that HostIP will not be updated even
    if there is a node is assigned to pod


$ oc explain pod.status.hostIPs
KIND:       Pod
VERSION:    v1

FIELD: hostIPs <[]HostIP>

DESCRIPTION:
    hostIPs holds the IP addresses allocated to the host. If this field is
    specified, the first entry must match the hostIP field. This list is empty
    if the pod has not started yet. A pod can be assigned to a node that has a
    problem in kubelet which in turns means that HostIPs will not be updated
    even if there is a node is assigned to this pod.
    HostIP represents a single IP address allocated to the host.

FIELDS:
  ip    <string>
    IP is the IP address assigned to the host


$ oc explain pod.status.podIP
KIND:       Pod
VERSION:    v1

FIELD: podIP <string>

DESCRIPTION:
    podIP address allocated to the pod. Routable at least within the cluster.
    Empty if not yet allocated.


$ oc explain pod.status.podIPs
KIND:       Pod
VERSION:    v1

FIELD: podIPs <[]PodIP>

DESCRIPTION:
    podIPs holds the IP addresses allocated to the pod. If this field is
    specified, the 0th entry must match the podIP field. Pods may be allocated
    at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have
    been allocated yet.
    PodIP represents a single IP address allocated to the pod.

FIELDS:
  ip    <string>
    IP is the IP address assigned to the pod
```

```shell
$ oc get pod -o custom-columns=NAME:.metadata.name,NODENAME:.spec.nodeName,HOSTIP:.status.hostIP,HOSTIPS:.status.hostIPs,PODIP:.status.podIP,PODIPS:.status.podIPs
NAME                                               NODENAME                                           HOSTIP          HOSTIPS                   PODIP           PODIPS
cluster-image-registry-operator-78946d6f5b-6zmfc   ip-99-888-14-45.xy-usa-nourth1.machine.external    99.888.14.45    [map[ip:99.888.14.45]]    22.333.0.116    [map[ip:22.333.0.116]]
image-pruner-28825920-7jtdw                        ip-99-888-14-116.xy-usa-nourth1.machine.external   99.888.14.116   [map[ip:99.888.14.116]]   22.333.6.17     [map[ip:22.333.6.17]]
image-pruner-28827360-x8jg6                        ip-99-888-14-41.xy-usa-nourth1.machine.external    99.888.14.41    [map[ip:99.888.14.41]]    10.129.2.20     [map[ip:10.129.2.20]]
image-pruner-28828800-76krv                        ip-99-888-14-102.xy-usa-nourth1.machine.external   99.888.14.102   [map[ip:99.888.14.102]]   10.129.4.15     [map[ip:10.129.4.15]]
image-registry-6dfc74459d-57979                    ip-99-888-14-50.xy-usa-nourth1.machine.external    99.888.14.50    [map[ip:99.888.14.50]]    22.333.2.23     [map[ip:22.333.2.23]]
image-registry-6dfc74459d-c79vt                    ip-99-888-14-102.xy-usa-nourth1.machine.external   99.888.14.102   [map[ip:99.888.14.102]]   10.129.4.13     [map[ip:10.129.4.13]]
node-ca-2lrmv                                      ip-99-888-14-99.xy-usa-nourth1.machine.external    99.888.14.99    [map[ip:99.888.14.99]]    99.888.14.99    [map[ip:99.888.14.99]]
node-ca-2lsbt                                      ip-99-888-14-94.xy-usa-nourth1.machine.external    99.888.14.94    [map[ip:99.888.14.94]]    99.888.14.94    [map[ip:99.888.14.94]]
node-ca-2npwz                                      ip-99-888-14-16.xy-usa-nourth1.machine.external    99.888.14.16    [map[ip:99.888.14.16]]    99.888.14.16    [map[ip:99.888.14.16]]
node-ca-5dlbf                                      ip-99-888-14-71.xy-usa-nourth1.machine.external    99.888.14.71    [map[ip:99.888.14.71]]    99.888.14.71    [map[ip:99.888.14.71]]
node-ca-5xxl5                                      ip-99-888-14-118.xy-usa-nourth1.machine.external   99.888.14.118   [map[ip:99.888.14.118]]   99.888.14.118   [map[ip:99.888.14.118]]
node-ca-5z4vg                                      ip-99-888-14-40.xy-usa-nourth1.machine.external    99.888.14.40    [map[ip:99.888.14.40]]    99.888.14.40    [map[ip:99.888.14.40]]
node-ca-6tzrj                                      ip-99-888-14-49.xy-usa-nourth1.machine.external    99.888.14.49    [map[ip:99.888.14.49]]    99.888.14.49    [map[ip:99.888.14.49]]
node-ca-6v55v                                      ip-99-888-14-72.xy-usa-nourth1.machine.external    99.888.14.72    [map[ip:99.888.14.72]]    99.888.14.72    [map[ip:99.888.14.72]]
node-ca-8n6rs                                      ip-99-888-14-78.xy-usa-nourth1.machine.external    99.888.14.78    [map[ip:99.888.14.78]]    99.888.14.78    [map[ip:99.888.14.78]]
node-ca-f5f67                                      ip-99-888-14-82.xy-usa-nourth1.machine.external    99.888.14.82    [map[ip:99.888.14.82]]    99.888.14.82    [map[ip:99.888.14.82]]
node-ca-fdnwj                                      ip-99-888-14-42.xy-usa-nourth1.machine.external    99.888.14.42    [map[ip:99.888.14.42]]    99.888.14.42    [map[ip:99.888.14.42]]
node-ca-fg2w5                                      ip-99-888-14-113.xy-usa-nourth1.machine.external   99.888.14.113   [map[ip:99.888.14.113]]   99.888.14.113   [map[ip:99.888.14.113]]
node-ca-ft2gh                                      ip-99-888-14-102.xy-usa-nourth1.machine.external   99.888.14.102   [map[ip:99.888.14.102]]   99.888.14.102   [map[ip:99.888.14.102]]
node-ca-jxjj7                                      ip-99-888-14-41.xy-usa-nourth1.machine.external    99.888.14.41    [map[ip:99.888.14.41]]    99.888.14.41    [map[ip:99.888.14.41]]
node-ca-k8l9d                                      ip-99-888-14-45.xy-usa-nourth1.machine.external    99.888.14.45    [map[ip:99.888.14.45]]    99.888.14.45    [map[ip:99.888.14.45]]
node-ca-k8ldv                                      ip-99-888-14-122.xy-usa-nourth1.machine.external   99.888.14.122   [map[ip:99.888.14.122]]   99.888.14.122   [map[ip:99.888.14.122]]
node-ca-k9xgk                                      ip-99-888-14-19.xy-usa-nourth1.machine.external    99.888.14.19    [map[ip:99.888.14.19]]    99.888.14.19    [map[ip:99.888.14.19]]
node-ca-kz5nr                                      ip-99-888-14-93.xy-usa-nourth1.machine.external    99.888.14.93    [map[ip:99.888.14.93]]    99.888.14.93    [map[ip:99.888.14.93]]
node-ca-nw8mr                                      ip-99-888-14-55.xy-usa-nourth1.machine.external    99.888.14.55    [map[ip:99.888.14.55]]    99.888.14.55    [map[ip:99.888.14.55]]
node-ca-q28wd                                      ip-99-888-14-116.xy-usa-nourth1.machine.external   99.888.14.116   [map[ip:99.888.14.116]]   99.888.14.116   [map[ip:99.888.14.116]]
node-ca-sv9rz                                      ip-99-888-14-50.xy-usa-nourth1.machine.external    99.888.14.50    [map[ip:99.888.14.50]]    99.888.14.50    [map[ip:99.888.14.50]]
```

### Pod Network
```shell
$ oc explain networks.operator.openshift.io
GROUP:      operator.openshift.io
KIND:       Network
VERSION:    v1

DESCRIPTION:
    Network describes the cluster's desired network configuration. It is
    consumed by the cluster-network-operator.
     Compatibility level 1: Stable within a major release for a minimum of 12
    months or 3 minor releases (whichever is longer).

FIELDS:
  apiVersion    <string>
    APIVersion defines the versioned schema of this representation of an object.
    Servers should convert recognized schemas to the latest internal value, and
    may reject unrecognized values. More info:
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

  kind  <string>
    Kind is a string value representing the REST resource this object
    represents. Servers may infer this from the endpoint the client submits
    requests to. Cannot be updated. In CamelCase. More info:
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

  metadata      <ObjectMeta>
    Standard object's metadata. More info:
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

  spec  <Object>
    NetworkSpec is the top-level network configuration object.

  status        <Object>
    NetworkStatus is detailed operator status, which is distilled up to the
    Network clusteroperator object.
```
```shell
$ oc -o yaml get networks.operator.openshift.io
apiVersion: v1
items:
- apiVersion: operator.openshift.io/v1
  kind: Network
  metadata:
    name: cluster
  spec:
    clusterNetwork:
    - cidr: 22.333.0.0/14
      hostPrefix: 23
    defaultNetwork:
      ovnKubernetesConfig:
        egressIPConfig: {}
        gatewayConfig:
          ipv4: {}
          ipv6: {}
          routingViaHost: false
        genevePort: 6081
        ipsecConfig:
          mode: Disabled
        mtu: 8901
        policyAuditConfig:
          destination: "null"
          maxFileSize: 50
          maxLogFiles: 5
          rateLimit: 20
          syslogFacility: local0
      type: OVNKubernetes
    deployKubeProxy: false
    disableMultiNetwork: false
    disableNetworkDiagnostics: false
    logLevel: Normal
    managementState: Managed
    observedConfig: null
    operatorLogLevel: Normal
    serviceNetwork:
    - 172.30.0.0/16
    unsupportedConfigOverrides: null
    useMultiNetworkPolicy: false
```
```shell
$ oc get pod -o custom-columns="NAME:.metadata.name,POD_NETWORKS:.metadata.annotations.k8s\.ovn\.org\/pod-networks"
NAME                                               POD_NETWORKS
cluster-image-registry-operator-78946d6f5b-6zmfc   {"default":{"ip_addresses":["22.333.0.116/23"],"mac_address":"0a:58:0a:80:00:74","gateway_ips":["22.333.0.1"],"routes":[{"dest":"22.333.0.0/14","nextHop":"22.333.0.1"},{"dest":"172.30.0.0/16","nextHop":"22.333.0.1"},{"dest":"100.64.0.0/16","nextHop":"22.333.0.1"}],"ip_address":"22.333.0.116/23","gateway_ip":"22.333.0.1"}}
image-pruner-28825920-7jtdw                        {"default":{"ip_addresses":["22.333.6.17/23"],"mac_address":"0a:58:0a:80:06:11","gateway_ips":["22.333.6.1"],"routes":[{"dest":"22.333.0.0/14","nextHop":"22.333.6.1"},{"dest":"172.30.0.0/16","nextHop":"22.333.6.1"},{"dest":"100.64.0.0/16","nextHop":"22.333.6.1"}],"ip_address":"22.333.6.17/23","gateway_ip":"22.333.6.1"}}
image-pruner-28827360-x8jg6                        {"default":{"ip_addresses":["10.129.2.20/23"],"mac_address":"0a:58:0a:81:02:14","gateway_ips":["10.129.2.1"],"routes":[{"dest":"22.333.0.0/14","nextHop":"10.129.2.1"},{"dest":"172.30.0.0/16","nextHop":"10.129.2.1"},{"dest":"100.64.0.0/16","nextHop":"10.129.2.1"}],"ip_address":"10.129.2.20/23","gateway_ip":"10.129.2.1"}}
image-pruner-28828800-76krv                        {"default":{"ip_addresses":["10.129.4.15/23"],"mac_address":"0a:58:0a:81:04:0f","gateway_ips":["10.129.4.1"],"routes":[{"dest":"22.333.0.0/14","nextHop":"10.129.4.1"},{"dest":"172.30.0.0/16","nextHop":"10.129.4.1"},{"dest":"100.64.0.0/16","nextHop":"10.129.4.1"}],"ip_address":"10.129.4.15/23","gateway_ip":"10.129.4.1"}}
image-registry-6dfc74459d-57979                    {"default":{"ip_addresses":["22.333.2.23/23"],"mac_address":"0a:58:0a:80:02:17","gateway_ips":["22.333.2.1"],"routes":[{"dest":"22.333.0.0/14","nextHop":"22.333.2.1"},{"dest":"172.30.0.0/16","nextHop":"22.333.2.1"},{"dest":"100.64.0.0/16","nextHop":"22.333.2.1"}],"ip_address":"22.333.2.23/23","gateway_ip":"22.333.2.1"}}
image-registry-6dfc74459d-c79vt                    {"default":{"ip_addresses":["10.129.4.13/23"],"mac_address":"0a:58:0a:81:04:0d","gateway_ips":["10.129.4.1"],"routes":[{"dest":"22.333.0.0/14","nextHop":"10.129.4.1"},{"dest":"172.30.0.0/16","nextHop":"10.129.4.1"},{"dest":"100.64.0.0/16","nextHop":"10.129.4.1"}],"ip_address":"10.129.4.13/23","gateway_ip":"10.129.4.1"}}
node-ca-2lrmv                                      <none>
node-ca-2lsbt                                      <none>
node-ca-2npwz                                      <none>
node-ca-5dlbf                                      <none>
node-ca-5xxl5                                      <none>
node-ca-5z4vg                                      <none>
node-ca-6tzrj                                      <none>
node-ca-6v55v                                      <none>
node-ca-8n6rs                                      <none>
node-ca-f5f67                                      <none>
node-ca-fdnwj                                      <none>
node-ca-fg2w5                                      <none>
node-ca-ft2gh                                      <none>
node-ca-jxjj7                                      <none>
node-ca-k8l9d                                      <none>
node-ca-k8ldv                                      <none>
node-ca-k9xgk                                      <none>
node-ca-kz5nr                                      <none>
node-ca-nw8mr                                      <none>
node-ca-q28wd                                      <none>
node-ca-sv9rz                                      <none>

$ oc get pod cluster-image-registry-operator-78946d6f5b-6zmfc -o json | jq -r '.metadata.annotations."k8s.ovn.org/pod-networks"' | jq -r .
{
  "default": {
    "ip_addresses": [
      "22.333.0.116/23"
    ],
    "mac_address": "0a:58:0a:80:00:74",
    "gateway_ips": [
      "22.333.0.1"
    ],
    "routes": [
      {
        "dest": "22.333.0.0/14",
        "nextHop": "22.333.0.1"
      },
      {
        "dest": "172.30.0.0/16",
        "nextHop": "22.333.0.1"
      },
      {
        "dest": "100.64.0.0/16",
        "nextHop": "22.333.0.1"
      }
    ],
    "ip_address": "22.333.0.116/23",
    "gateway_ip": "22.333.0.1"
  }
}
```
### Container

```shell
oc get pod -o custom-columns="NAME:.metadata.name,INIT_CONTAINERS:.spec.initContainers[*].name,CONTAINERS:.spec.containers[*].name"
NAME                                                              INIT_CONTAINERS                                  CONTAINERS
etcd-guard-ip-99-888-14-40.xy-usa-nourth1.machine.external        <none>                                           guard
etcd-guard-ip-99-888-14-45.xy-usa-nourth1.machine.external        <none>                                           guard
etcd-guard-ip-99-888-14-82.xy-usa-nourth1.machine.external        <none>                                           guard
etcd-ip-99-888-14-40.xy-usa-nourth1.machine.external              setup,etcd-ensure-env-vars,etcd-resources-copy   etcdctl,etcd,etcd-metrics,etcd-readyz
etcd-ip-99-888-14-45.xy-usa-nourth1.machine.external              setup,etcd-ensure-env-vars,etcd-resources-copy   etcdctl,etcd,etcd-metrics,etcd-readyz
etcd-ip-99-888-14-82.xy-usa-nourth1.machine.external              setup,etcd-ensure-env-vars,etcd-resources-copy   etcdctl,etcd,etcd-metrics,etcd-readyz
revision-pruner-8-ip-99-888-14-40.xy-usa-nourth1.machine.external <none>                                           pruner
revision-pruner-8-ip-99-888-14-45.xy-usa-nourth1.machine.external <none>                                           pruner
revision-pruner-8-ip-99-888-14-82.xy-usa-nourth1.machine.external <none>                                           pruner                        pruner
```