🌐
Ansible
docs.ansible.com › projects › ansible › latest › collections › kubernetes › core › k8s_module.html
kubernetes.core.k8s module – Manage Kubernetes (K8s) objects — Ansible Community Documentation
- name: Create a k8s namespace kubernetes.core.k8s: name: testing api_version: v1 kind: Namespace state: present - name: Create a Service object from an inline definition kubernetes.core.k8s: state: present definition: apiVersion: v1 kind: Service metadata: name: web namespace: testing labels: app: galaxy service: web spec: selector: app: galaxy service: web ports: - protocol: TCP targetPort: 8000 name: port-8000-tcp port: 8000 - name: Remove an existing Service object kubernetes.core.k8s: state: absent api_version: v1 kind: Service namespace: testing name: web # Passing the object definition from a file - name: Create a Deployment by reading the definition from a local file kubernetes.core.k8s: state: present src: /testing/deployment.yml - name: >- Read definition file from the Ansible controller file system.
🌐
Opensource.com
opensource.com › article › 20 › 9 › ansible-modules-kubernetes
Automate your container orchestration with Ansible modules for Kubernetes | Opensource.com
To try out Kubernetes modules in Ansible, you must have access to a Kubernetes cluster. If you don't have that, then you might try to open a trial account online, but most of those are short term. Instead, you can install Minikube, as described on the Kubernetes website or in Bryant Son's excellent article on getting started with Minikube.
🌐
Kubernetes
kubernetes.io › blog › 2019 › 03 › 15 › kubernetes-setup-using-ansible-and-vagrant
Kubernetes Setup Using Ansible and Vagrant | Kubernetes
January 3, 2026 - Ansible should be installed in your machine. Refer to the Ansible installation guide for platform specific installation. We will be setting up a Kubernetes cluster that will consist of one master and two worker nodes.
🌐
Red Hat
redhat.com › en › topics › automation › Ansible-vs-Kubernetes
Ansible vs. Kubernetes: how they work together
Ansible and Kubernetes are open source platforms that serve different roles in automating IT environments, and which can be used separately or together. Ansible's main goal is to automate repetitive IT processes across infrastructure components.
🌐
TauCeti
tauceti.blog › posts › kubernetes-the-not-so-hard-way-with-ansible-the-basics
Kubernetes the not so hard way with Ansible - The basics - (K8s v1.28) - TauCeti blog
January 1, 2024 - So in /opt/scripts/ansible directory I execute the following command: ... That creates a directory called k8s-01_vms. k8s-01 is for “Kubernetes Cluster 01” and vms for “Virtual Machines”. So everything related to the “Physical Hosts” will be managed by k8s-01_phy (just FYI, not relevant for this blog series) and every thing related to the “Virtual Machines” which runs on the Physical Hosts will go into k8s_01_vms.
🌐
Ansibleforkubernetes
ansibleforkubernetes.com
Ansible for Kubernetes - a book by Jeff Geerling
This book takes users on an automation journey—from building your first Kubernetes cluster with Ansible's help, to deploying and maintaining real-world, massively-scalable and highly-available applications.
🌐
Spacelift
spacelift.io › blog › ansible-kubernetes
How to Manage Kubernetes with Ansible [Tutorial]
October 10, 2025 - This module introduces an abstraction layer that simplifies Kubernetes setups into a more manageable and readable format. Ansible allows you to use logic and variables to deploy the same playbook consistently to different environments.
Find elsewhere
🌐
GitHub
github.com › ansible-collections › kubernetes.core
GitHub - ansible-collections/kubernetes.core: 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. · GitHub
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. - ansible-collections/kubernetes.core
Starred by 251 users
Forked by 165 users
Languages   Python
🌐
Amazon
amazon.com › Ansible-Kubernetes-Example-Automate-Cluster › dp › 1484292847
Ansible for Kubernetes by Example: Automate Your Kubernetes Cluster with Ansible: Berton, Luca: 9781484292846: Amazon.com: Books
Implementing GitOps with Kubernetes: Automate, manage, scale, and secure infrastructure and cloud-native applications on AWS and Azure ... Learn Ansible: Automate your cloud infrastructure, security configuration, and application deployment with Ansible
🌐
Medium
medium.com › @a.j.longchamps › home-lab-kubernetes-part-3-initializing-the-kubernetes-cluster-with-ansible-d979dc1aeea0
Home Lab Kubernetes Part 3: Initializing The Kubernetes Cluster With Ansible | by Aaron Longchamps | Medium
June 19, 2024 - The first role Ansible calls will run 10-configure-base on all 5 of the nodes. This playbook adds the Kubernetes 1.30 repository, installs various packages, holds the Kubernetes specific packages at their current version in apt, and applies some other OS configurations.
🌐
GitHub
github.com › geerlingguy › ansible-role-kubernetes
GitHub - geerlingguy/ansible-role-kubernetes: Ansible Role - Kubernetes · GitHub
An Ansible Role that installs Kubernetes on Linux.
Starred by 621 users
Forked by 284 users
Languages   Jinja
🌐
HOSTAFRICA
hostafrica.com › home › automate kubernetes cluster deployment with ansible on centos stream 8
Automate Kubernetes with Ansible - HOSTAFRICA
January 21, 2026 - Learn how to automate the deployment of Kubernetes clusters using Ansible on CentOS Stream 8, with containerd.
🌐
Spacelift
spacelift.io › blog › ansible-vs-kubernetes
Ansible vs. Kubernetes [Key Differences Explained]
March 4, 2026 - If you would like to know more ... are used with Ansible. Kubernetes is an open-source platform designed to automate the deployment, scaling, and management of containerized applications....
🌐
Medium
akpolatcem.medium.com › building-a-production-ready-kubernetes-cluster-with-ansible-from-zero-to-running-in-30-minutes-a09f34deb671
Building a Production-Ready Kubernetes Cluster with Ansible: From Zero to Running in 30 Minutes | by ca | Medium
August 4, 2025 - Each role builds upon the previous one and addresses specific Kubernetes operational requiremets. k8s-common configures Linux kernel and services to support container operations and Kubernetes networking. k8s-master creates the centralized control plane that manages cluster state, scheduling, and API access. k8s-worker adds worker capacity and ensures distributed networkig functions across the cluster. Based on the previous definitions for each role, the project structure has the code structure below: k8s-ansible/ ├── inventory/hosts.yml # Node definitions ├── playbooks/ # Step-by-
🌐
GitHub
github.com › geerlingguy › ansible-for-kubernetes
GitHub - geerlingguy/ansible-for-kubernetes: Ansible and Kubernetes examples from Ansible for Kubernetes Book · GitHub
This repository contains Ansible and Kubernetes examples developed to support different sections of Ansible for Kubernetes by Jeff Geerling.
Starred by 731 users
Forked by 318 users
Languages   Shell 80.0% | Go 13.0% | Ruby 4.5% | Dockerfile 2.5%
🌐
Ansible
docs.ansible.com › projects › ansible › latest › collections › kubernetes › core › kubectl_connection.html
kubernetes.core.kubectl connection – Execute tasks in pods running on Kubernetes. — Ansible Community Documentation
- name: Run a command in a pod using local kubectl with kubeconfig file ~/.kube/config hosts: localhost gather_facts: no vars: ansible_connection: kubernetes.core.kubectl ansible_kubectl_namespace: my-namespace ansible_kubectl_pod: my-pod ansible_kubectl_container: my-container tasks: # be aware that the command is executed as the user that started the container # and requires python to be installed in the image - name: Run a command in a pod ansible.builtin.command: echo "Hello, World!"
🌐
GitHub
github.com › torgeirl › kubernetes-playbooks
GitHub - torgeirl/kubernetes-playbooks: Ansible playbooks for setting up a Kubernetes cluster · GitHub
Ansible playbooks that creates a Kubernetes 1.29 cluster of Openstack instances running Ubuntu 22.04 LTS.
Starred by 107 users
Forked by 66 users
Languages   HCL