-
Notifications
You must be signed in to change notification settings - Fork 104
k8s_info doesn't work with Kubernetes Custom Resources (CR) #202
Comments
@fmuyassarov - Just to confirm, if you run |
Yes it does. Here is the example:
|
I have tried with other custom resources as well that are recognized by the k8s API server. However, I get the same result from Ansible k8s_info for all of them. I also thought that the kind of the object is key sensitive, so I tried with both Baremetalhost and baremetalhost, but no success. |
@fmuyassarov Since you are using custom resources, it typically has different For example - if you create a custom resource your playbook will look like - ---
- hosts: localhost
tasks:
- community.kubernetes.k8s_info:
kind: crontab
api_version: "stable.example.com/v1" you will get -
needs_info |
Let me know if it does not work after specifying |
@fmuyassarov Could you please take a look at #203 and comment if it looks to you? Thanks for the feedback. |
Documentation issue addressed in #203 |
SUMMARY
Ansible Module k8s_info doesn't recognize Kubernetes Custom Resources (CR) even though
kubectl
client does.I have created custom resource on my Kubernetes cluster called
Baremetalhost
. I can do any CRUD (create, read, update, delete) operations on that custom resource usingkubectl.
Example:
However, when try to use
k8s_info
module, the playbook doesn't print out expected list of Baremetalhosts. Currently, I can run k8s_info module only against standard Kubernetes objects, such as Pod, Deployment, ConfigMap, etc but not custom objects that are already recognized by the Kubernetes API server.ISSUE TYPE
COMPONENT NAME
k8s_info
ANSIBLE VERSION
OS / ENVIRONMENT
CentOS Linux 8 (Core)
STEPS TO REPRODUCE
EXPECTED RESULTS
List of the Baremetalhost objects.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: