interface Services {
    create(
        serviceRef: ServiceRef,
        labels: Record<string, string>,
        servicePort: number,
        podTargetPort: number,
    ): Promise<Service>;
    list(namespace: NamespaceName, labels?: string[]): Promise<Service[]>;
    read(namespace: NamespaceName, name: string): Promise<Service>;
}

Implemented by

Methods

Methods

  • Create a service

    Parameters

    • serviceRef: ServiceRef

      service reference

    • labels: Record<string, string>

      the labels for the service

    • servicePort: number

      the service port

    • podTargetPort: number

      the target port

    Returns Promise<Service>

    the service

    if the service could not be created