@hashgraph/solo
    Preparing search index...
    interface Pods {
        create(
            podReference: PodReference,
            labels: Record<string, string>,
            containerName: ContainerName,
            containerImage: string,
            containerCommand: string[],
            startupProbeCommand: string[],
        ): Promise<Pod>;
        list(namespace: NamespaceName, labels: string[]): Promise<Pod[]>;
        listForAllNamespaces(labels: string[]): Promise<Pod[]>;
        read(podReference: PodReference): Promise<Pod>;
        readByReference(podReference: PodReference): Pod;
        readDescribe(podReference: PodReference): Promise<string>;
        readDescribe(podReference: PodReference): Promise<string>;
        readLogs(podReference: PodReference, timestamps?: boolean): Promise<string>;
        readLogs(podReference: PodReference, timestamps?: boolean): Promise<string>;
        topPods(
            namespace?: NamespaceName,
            labelSelector?: string,
        ): Promise<PodMetricsItem[]>;
        waitForReadyStatus(
            namespace: NamespaceName,
            labels?: string[],
            maxAttempts?: number,
            delay?: number,
            createdAfter?: Date,
        ): Promise<Pod[]>;
        waitForRunningPhase(
            namespace: NamespaceName,
            labels: string[],
            maxAttempts: number,
            delay: number,
            podItemPredicate?: (items: Pod) => boolean,
            createdAfter?: Date,
        ): Promise<Pod[]>;
    }

    Implemented by

    Index

    Methods

    • Create a pod

      Parameters

      • podReference: PodReference

        the reference to the pod

      • labels: Record<string, string>

        list of label records where the key is the label name and the value is the label value

      • containerName: ContainerName

        the name of the container

      • containerImage: string

        the image of the container

      • containerCommand: string[]

        the command to run in the container

      • startupProbeCommand: string[]

        the command to run in the startup probe

      Returns Promise<Pod>

      the pod that was created

    • Get CPU and memory usage for pods via the Kubernetes Metrics API (equivalent to kubectl top pod)

      Parameters

      • Optionalnamespace: NamespaceName

        if provided, only get metrics for pods in this namespace; otherwise get metrics for all namespaces

      • OptionallabelSelector: string

        if provided, only get metrics for pods matching this label selector

      Returns Promise<PodMetricsItem[]>

      list of pod metrics items with CPU (in millicores) and memory (in mebibytes)

    • Check if pod's ready status is true

      Parameters

      • namespace: NamespaceName

        namespace

      • Optionallabels: string[]

        pod labels

      • OptionalmaxAttempts: number

        maximum attempts to check

      • Optionaldelay: number

        delay between checks in milliseconds

      • OptionalcreatedAfter: Date

        if provided, only pods created strictly after this date are considered

      Returns Promise<Pod[]>

    • Check if pod's phase is running

      Parameters

      • namespace: NamespaceName

        namespace

      • labels: string[]

        pod labels

      • maxAttempts: number

        maximum attempts to check

      • delay: number

        delay between checks in milliseconds

      • OptionalpodItemPredicate: (items: Pod) => boolean

        pod item predicate

      • OptionalcreatedAfter: Date

        if provided, only pods created strictly after this date are considered

      Returns Promise<Pod[]>