DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Creating Kubernetes Dynamic Inventories with kubernetes.core Modules

2 years ago www.ansible.com
Creating Kubernetes Dynamic Inventories with kubernetes.core Modules

Summary: This is a summary of an article originally published by the source. Read the full original article here →

When managing infrastructure, there are times when a dynamic inventory is essential. Recently, I decided to play with using a Kubernetes dynamic inventory to manage pods, but finding the details on how to use and apply it was a bit scarce. As such, I wanted to write a quick start guide on how you can create an Ansible Playbook to retrieve your pods within a namespace and generate a Kubernetes dynamic inventory. This is much easier to do when you take advantage of the kubernetes.core.k8s_info module. In my example, I’m going to take advantage of using my existing ansible-automation-platform namespace that has a list of pods to create my dynamic inventory.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com