jina.peapods.pods.k8s module

class jina.peapods.pods.k8s.K8sPod(args, needs=None)[source]

Bases: jina.peapods.pods.BasePod

The K8sPod (KubernetesPod) is used for deployments on Kubernetes.

property port_expose: int

Not implemented

Return type

int

property host: str

Not implemented

Return type

str

start()[source]

Deploy the kubernetes pods via k8s Deployment and k8s Service.

Return type

K8sPod

Returns

self

wait_start_success()[source]

Not implemented. It should wait until the deployment is up and running

close()[source]

Not implemented. It should delete the namespace of the flow

join()[source]

Not implemented. It should wait to make sure deployments are properly killed.

update_pea_args()[source]

Regenerate deployment args

property is_ready: bool

Not implemented. It assumes it is ready.

Return type

bool

Returns

True

property head_args: argparse.Namespace

Head args of the pod.

Return type

Namespace

Returns

namespace

property tail_args: argparse.Namespace

Tail args of the pod

Return type

Namespace

Returns

namespace

is_singleton()[source]

The k8s pod is always a singleton

Return type

bool

Returns

True

property num_peas: int

Number of peas. Currently unused.

Return type

int

Returns

number of peas

property head_zmq_identity: bytes

zmq identity is not needed for k8s deployment

Return type

bytes

Returns

zmq identity

property deployments: List[Dict]

Deployment information which describes the interface of the pod.

Return type

List[Dict]

Returns

list of dictionaries defining the attributes used by the routing table