kubernetes.core.k8s_cluster_info – Describe Kubernetes (K8s) cluster, APIs available and their respective versions¶
Note
This plugin is part of the kubernetes.core collection (version 1.2.1).
To install it use: ansible-galaxy collection install kubernetes.core
.
To use it in a playbook, specify: kubernetes.core.k8s_cluster_info
.
New in version 0.11.1: of kubernetes.core
Synopsis¶
Use the OpenShift Python client to perform read operations on K8s objects.
Authenticate using either a config file, certificates, password or token.
Supports check mode.
Note
This module has a corresponding action plugin.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
openshift >= 0.6
PyYAML >= 3.11
Parameters¶
Notes¶
Note
The OpenShift Python client wraps the K8s Python client, providing full access to all of the APIS and models available on both platforms. For API version details and additional information visit https://github.com/openshift/openshift-restclient-python
To avoid SSL certificate validation errors when
validate_certs
is True, the full certificate chain for the API server must be provided viaca_cert
or in the kubeconfig file.
Examples¶
- name: Get Cluster information
kubernetes.core.k8s_cluster_info:
register: api_status
- name: Do not invalidate cache before getting information
kubernetes.core.k8s_cluster_info:
invalidate_cache: False
register: api_status
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Abhijeet Kasurde (@Akasurde)