K8s config API#
Before you start, make sure that the igz_mgmt package is installed and that you are logged in to the system with the igz_mgmt.Client API. If not, see Control plane API.
import igz_mgmt
client = igz_mgmt.Client(access_key="some-access-id")
Get the k8s config#
k8s_config = igz_mgmt.K8sConfig.get(client)
Get app services from k8s config(db)#
The app services that are stored in the k8s config are the same app services that are currently stored in the db.
k8s_config = igz_mgmt.K8sConfig.list(client, filter_by={"namespace": "default-tenant"})
for app_service in k8s_config.app_services:
print(f"Service name: {app_service.spec.name}, kind: {app_service.spec.kind}")