Deployment
Last updated
Last updated
Default version: apps/v1
Deployments rely on pods, so you can get the pod template as K8sPod
class:
To retrieve the pod template as an array, pass false
to the retrieval method:
To get the pods, the Pod template must have the deployment-name
label set. This way, the labelSelector
API parameter is issued and you may retrieve the associated pods:
You can retrieve the pods as resources controlled by the Deployment by issuing ->getPods()
:
If you cannot declare the deployment-name
label or simply want to use something else, you may call selectPods
from the resource:
The Scaling API is available via a K8sScale
resource:
Shorthand, you can use scale()
directly from the Deployment:
The Status API is available to be accessed for fresh instances:
You can check if all the pods within the Deployment are running: