rubrik_polaris.k8s package¶
Submodules¶
rubrik_polaris.k8s.cluster module¶
-
rubrik_polaris.k8s.cluster.
create_k8s_cluster
(self, cdm_cluster_id, host_list, k8s_cluster_name, kupr_ingress_port, user_port_ranges, rbs_port_ranges, kupr_cluster_type, proxy_url=None)¶ Add a Kubernetes cluster
- Parameters
cdm_cluster_id (uuid) – The ID of the CDM cluster for ON_PREM k8s clusters.
host_list (list) – List of host IPs/hostnames of the k8s nodes.
k8s_cluster_name (str) – Name of the k8s cluster.
kupr_ingress_port (int) – Port on the k8s node for the kupr Ingress Controller.
user_port_ranges (dict) – Node port ranges dedicated for export operations.
rbs_port_ranges (dict) – Ports in the range of node port service range of the Kubernetes cluster.
kupr_cluster_type (str) – KuprClusterType of the k8s cluster.
proxy_url (str) – Proxy URL for egress calls into Polaris
- Returns
Details of created k8s cluster in Polaris
- Return type
dict
- Raises
PolarisException – If the query to Polaris returned an error
Examples
>>> rubrik.create_k8s_cluster( "b946faa1-ee98-4924-affb-9b4315686879", ["1.2.3.4", "1.2.3.5"], 30000, {"portMin": 30100, "portMax": 30200}, {"portMin": 30300, "portMax": 30400}, "ON_PREM" )
-
rubrik_polaris.k8s.cluster.
refresh_k8s_cluster
(self, kupr_cluster_id, wait=False)¶ Refresh resources of a Kubernetes cluster.
- Parameters
kupr_cluster_id (uuid) – The ID of the kupr cluster to be refreshed.
wait (bool) – Wait for taskchain completion before return
- Returns
Details of the refresh job
- Return type
dict
- Raises
PolarisException – If the query to Polaris returned an error
-
rubrik_polaris.k8s.cluster.
list_k8s_clusters
(self)¶ List Kubernetes clusters.
Args:
- Returns
List of kubernetes clusters
- Return type
list
- Raises
PolarisException – If the query to Polaris returned an error
-
rubrik_polaris.k8s.cluster.
get_k8s_status
(self, kupr_cluster_id)¶ Get k8s cluster status
- Parameters
kupr_cluster_id (uuid) – The ID of the kupr cluster to be refreshed.
- Returns
Kubernetes cluster status
- Return type
dict
- Raises
PolarisException – If the query to Polaris returned an error
rubrik_polaris.k8s.namespace module¶
-
rubrik_polaris.k8s.namespace.
get_k8s_namespaces
(self, query_filter=None)¶ Get all k8s namespaces
Args:
- Returns
Kubernetes namespaces
- Return type
list
- Raises
PolarisException – If the query to Polaris returned an error
-
rubrik_polaris.k8s.namespace.
get_k8s_namespace
(self, polaris_id)¶ Get k8s namespace
- Parameters
polaris_id (uuid) – The Polaris UUID for the object.
- Returns
Kubernetes namespace details
- Return type
dict
- Raises
PolarisException – If the query to Polaris returned an error
Module contents¶
Collection of functions that interact with Kubernetes object primitives.