kube module¶
-
class
kube.
KubernetesCompute
(config)¶ Bases:
tycho.compute.Compute
A Kubernetes specific implementation.
Tested with Minikube and Google Kubernetes Engine.
-
delete
(name, namespace='default')¶ Delete the deployment.
- Parameters
name (str) – GUID of the system to delete.
namespace (str) – Namespace the system runs in.
-
get_service_ip_address
(service_metadata)¶
-
pod_to_deployment
(name, template, namespace='default')¶ Create a deployment specification based on a pod template.
- Parameters
name (str) – Name of the system.
template (str) – Relative path to the template to use.
namepsace – Namespace to run the pod in.
-
start
(system, namespace='default')¶ Start an abstractly described distributed system on the cluster. Generate each required K8s artifact and wire them together. Currently explicitly modeled elements include Deployment, PersistentVolume, PersistentVolumeClaim, and Service components.
- Parameters
system (
System
) – An abstract system model.namespace (str) – Namespace to run the system in.
-
status
(name=None, namespace='default')¶ Get status. Without a name, this will get status for all running systems. With a name, it will get status for the specified system.
- Parameters
name (str) – GUID of a system to get status for.
namespace (str) – Namespace the system runs in.
-