🌐
Spacelift
spacelift.io › blog › ansible-kubernetes
How to Manage Kubernetes with Ansible [Tutorial]
October 10, 2025 - Discover ways to deploy Kubernetes with Ansible. See examples of managing resources, creating a Kubernetes cluster using Ansible, and more.
Discussions

Do you use ansible with kubernetes?
I do, in fact am writing a book about it ;) It does change the particular things Ansible is used for (less application side, more initialization-side and cluster management). More on reddit.com
🌐 r/ansible
23
26
February 15, 2021
Made a written guide and video tutorial for deploying a Kubernetes cluster within Proxmox using Ansible. Check it out and let me know how it can be improved!

Written guide - https://austinsnerdythings.com/2022/04/25/deploying-a-kubernetes-cluster-within-proxmox-using-ansible/

More on reddit.com
🌐 r/Proxmox
13
109
April 26, 2022
Tutorial: Deploying a Kubernetes cluster using Ansible within Proxmox
Hope you all find this helpful. To me, Kubernetes was (still is) a bit of a vague idea for deploying large software stacks effortlessly in the cloud. I'd like to learn somewhere cheaper (read: my homelab) so I developed a way to get a basic cluster deployed repeatably and consistently. I'm trying to up my devops skills and this seemed like a good method. Link to written guide - https://austinsnerdythings.com/2022/04/25/deploying-a-kubernetes-cluster-within-proxmox-using-ansible/ More on reddit.com
🌐 r/homelab
6
46
April 26, 2022
I made a tutorial showing how to deploy a Kubernetes cluster using Ansible on Proxmox VMs. I'm a relative noob at Kubernetes so any feedback/suggestions would be very much appreciated!
🌐 r/kubernetes
12
61
April 25, 2022
🌐
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.
🌐
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.
🌐
Adam the Automator
adamtheautomator.com › ansible-kubernetes
How to Use the Ansible Kubernetes Module
Learn how to automate containerized application management with the Ansible Kubernetes module and Ansible playbook in this step-by-step tutorial!
Published   June 4, 2023
🌐
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.
🌐
Das Blinken Lichten
dasblinkenlichten.com › getting-started-kubernetes-using-ansible
Getting started with Kubernetes using Ansible – Das Blinken Lichten
March 25, 2017 - To do this we’ll create a new role directory called ‘kubernetes’ and then clone my repository into it like this… · user@ubuntu-1:~$ cd /etc/ansible/roles user@ubuntu-1:/etc/ansible/roles$ sudo mkdir kubernetes user@ubuntu-1:/etc/ansible/roles$ cd kubernetes/ user@ubuntu-1:/etc/ansible/roles/kubernetes$ sudo git clone https://github.com/jonlangemak/ansible_kubernetes.git .
Find elsewhere
🌐
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
Each lesson utilizes a specific use-case for the modern Kubernetes cluster and focuses on a single module from the most crucial parameter, complete with code demonstrations. Each code example is battle-proven in real-life with console interaction and verification. ... IT professionals who would like a jargon-free understanding of Ansible technology, Windows Systems Administrators, DevOps professionals, thought leaders, and infrastructure-as-code enthusiasts.
🌐
Redhat-scholars
redhat-scholars.github.io › ansible-tutorial › ansible-tutorial › 13-kubernetes.html
Ansible Kubernetes :: Ansible Tutorial
- name: Login hosts: localhost connection: local gather_facts: false environment: K8S_AUTH_HOST: "https://api.sandbox-m2.ll9k.p1.openshiftapps.com:6443" (1) K8S_AUTH_API_KEY: "sha256~NRG7aBVOdaRonMJ172H16KrS0Chy--knwpefomLrcZA" (2) tasks: - name: Delete The Application kubernetes.core.k8s: state: absent api_version: v1 kind: Deployment namespace: asotobue-dev (3) name: hello-world - name: Delete The Service kubernetes.core.k8s: state: absent api_version: v1 kind: Service namespace: asotobue-dev (4) name: hello-world ... Ansible Kubernetes Collection also integrates with Ansible templates, so you can define Kubernetes manifests as templates.
🌐
Ansible
docs.ansible.com › projects › ansible › 4 › scenario_guides › kubernetes_scenarios › scenario_k8s_object.html
Creating K8S object — Ansible Documentation
January 20, 2022 - This guide will show you how to utilize Ansible to create Kubernetes objects such as Pods, Deployments, and Secrets.
🌐
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%
🌐
GitHub
gist.github.com › allanger › 84db2647578316f8e721f7219052788f
Deploy Kubernetes with Ansible · GitHub
Deploy Kubernetes with Ansible · Raw · Deploy_Kubernetes.md · We will need at least two nodes, Ansible, and a kubectl. That's enough to begin. My ansible role: https://github.com/allanger/kubeadm-ansible-role · I am using Ubuntu 21.04 on all my servers so my Ansible role is written for Debian-based distros.
🌐
Medium
medium.com › @18bhavyasharma › deploying-a-kubernetes-openshift-cluster-using-ansible-218ab6544d42
Deploying a Kubernetes/OpenShift Cluster Using Ansible | by bhavya sharma | Medium
October 28, 2024 - For OpenShift deployments, the openshift-ansible playbooks can be used, providing specific roles for setting up OpenShift clusters. Here’s a breakdown of key playbooks for a Kubernetes cluster setup, covering installing Docker (the container runtime), initializing the control-plane, configuring worker nodes, and setting up networking.
🌐
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 - Home Lab Kubernetes Part 3: Initializing The Kubernetes Cluster With Ansible Series Index Part 1: Building an Ubuntu 23.10 Template With Packer in the Home Lab Part 2: Deploying VMs from a Template …
🌐
GitHub
github.com › kairen › kube-ansible
GitHub - kairen/kube-ansible: Build a Kubernetes cluster via Ansible playbook. :wrench: :wrench: · GitHub
Build a Kubernetes cluster via Ansible playbook. :wrench: :wrench: :wrench: - kairen/kube-ansible
Starred by 443 users
Forked by 192 users
Languages   HTML 93.4% | Shell 5.1% | Python 1.3% | Ruby 0.2%
🌐
Ansible
docs.ansible.com › 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.
🌐
GitHub
github.com › torgeirl › kubernetes-playbooks
GitHub - torgeirl/kubernetes-playbooks: Ansible playbooks for setting up a Kubernetes cluster · GitHub
$ ansible-playbook -i tf-project/ansible_inventory playbooks/workers.yml · Run kubectl get nodes once more on the master node to verify the worker nodes got added. Edit cluster settings in the keystone_rc.sh and source it again before re-running terraform apply to change the cluster, before re-running the playbooks to add new workers. ... Based on bsder's Digital Ocean tutorial «How To Create a Kubernetes ...
Starred by 107 users
Forked by 66 users
Languages   HCL
🌐
Ansible
docs.ansible.com › ansible › 2.9 › scenario_guides › guide_kubernetes.html
Kubernetes and OpenShift Guide — Ansible Documentation
--- - hosts: localhost remote_user: root roles: - role: ansible.kubernetes-modules - role: hello-world