The collection includes a variety of Ansible content to help automate the management of applications in Kubernetes and OpenShift clusters, as well as the provisioning and maintenance of clusters themselves.
Is it currently possible to run commands like this and collect the value in an ansible variable?
kubectl top pods --containers --namespace=my-namespace
kubectl top pods --containers -A
kubectl top pods -A --sort-by=cpu
kubectl top pods -A --sort-by=memory
@silvermind Thanks for reporting this issue. You can use shell or command module to invoke kubectl commands. Right now, we do not have any module specifically for kubectl.
SUMMARY
Is it currently possible to run commands like this and collect the value in an ansible variable?
ISSUE TYPE
COMPONENT NAME
https://github.com/ansible-collections/kubernetes.core#modules
ANSIBLE VERSION
2.12