# What are the requirements for using Ansible k8s module?

**URL:** <https://forum.ansible.com/t/what-are-the-requirements-for-using-ansible-k8s-module/31471>\
**Category:** Ansible Project\
**Tags:** kubernetes\
**Created:** [October 16, 2019, 4:26am UTC](https://forum.ansible.com/t/what-are-the-requirements-for-using-ansible-k8s-module/31471 "2019-10-16T04:26:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Li](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@David\_Li](https://forum.ansible.com/u/David_Li)\
**Post date:** [October 16, 2019, 4:26am UTC](https://forum.ansible.com/t/what-are-the-requirements-for-using-ansible-k8s-module/31471/1 "2019-10-16T04:26:04Z")

</div>

Hi,

I am testing the k8s module on a Kubernetes cluster. I created a simple test task like this:

- name: Test  
k8s:  
kind: Namespace  
name: test-ns  
state: present  
api\_version:v1  
kubeconfig: \< some path to the kube config file\>

But when I ran the playbook, I got errors like "

ImportError: no module kubernetes".

I have locally installed Python kubernetes module on the Ansible host. Do I need to install it on the target hosts?

Thanks.  
Davdi
