🌐
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.
🌐
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 - In this comprehensive guide, we’ll build a robust Kubernetes cluster using Ansible automation that can serve both development and production workloads. By the end, you’ll have a reproducible, version-controlled infrastructure setup that can be deployed in minutes.
🌐
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 …
🌐
OneUptime
oneuptime.com › home › blog › how to use ansible to deploy kubernetes deployments
How to Use Ansible to Deploy Kubernetes Deployments
February 21, 2026 - Kubernetes Deployments managed through Ansible give you a powerful combination: Kubernetes handles the runtime orchestration (rolling updates, self-healing, scaling), while Ansible handles the configuration management (parameterized manifests, secret injection, environment-specific values, deployment verification).
🌐
Spacelift
spacelift.io › blog › ansible-kubernetes
How to Manage Kubernetes with Ansible [Tutorial]
October 10, 2025 - However, it’s a bit complex to set up and manage, as you use the command line and run ‘kubectl’ each time you want to deploy a Kubernetes resource. This process still requires some manual work and increases your margin of error. This is comparable to a Linux environment. You can either run commands one by one or create a complex bash script that is not easily readable. The way Ansible revolutionized Linux application deployments, you can now also do with Kubernetes using the kubernetes.core.k8s module.
Find elsewhere
🌐
Red Hat
redhat.com › en › topics › automation › Ansible-vs-Kubernetes
Ansible vs. Kubernetes: how they work together
While Kubernetes excels at orchestrating containerized workloads, customers typically need to introduce additional tools for infrastructure provisioning, application lifecycle management, and multi-cluster support. Manually managing these tasks can be overwhelming and increases the risk of human error. Ansible addresses these challenges by automating cluster provisioning, enforcing configurations, and managing application deployments across Kubernetes environments.
🌐
Kubeclusters
kubeclusters.com › docs › How-to-Deploy-a-Single-Master-Kubernetes-Cluster-with-Ansible
How to Deploy a single master Kubernetes cluster with Ansible | Kube Clusters Documentation
5.Modify the Ansible inventory file/etc/ansible/hosts to fit your environment. Usually you need to replace server’s IP addresses and its interface name. If you prefer to use calico as your network component, change network_plugin’s value to calico · # Kubernetes nodes [kube-master] 192.168.100.10 node_name=master01 [kube-node] 192.168.100.20 node_name=node01 192.168.100.30 node_name=node02 [all:vars] # Choose network plugin (calico or flannel) network_plugin="flannel" # Set up pod network pod_network="10.244.0.0/16" # The Exec Files Directory On Kubernetes Nodes bin_dir="/usr/local/bin" #
🌐
Reddit
reddit.com › r/homelab › installing your kubernetes homelab cluster in minutes with ansible
r/homelab on Reddit: Installing your Kubernetes homelab cluster in minutes with Ansible
December 12, 2022 -

For anyone looking to get Kubernetes going in their homelab, I created a guide at Installing your Kubernetes homelab cluster in minutes with Ansible.

I tried to take a different approach them other guides out there by focusing more on using config as code practices and automating much of the install using ansible and terraform.

The previous parts of the series focus on installing vmware vsphere 8 and using terraform to create all the virtual machines that kubernetes gets installed on.

I have been using this process over the last year or two for my own homelab cluster so figured I'd clean up my notes, create a blog, and see if anyone else finds it helpful.

Let me know what you think so I can try to make the content better.

🌐
DEV Community
dev.to › himaatluri › kubernetes-deployment-with-ansible-a-comprehensive-guide-to-bootstraping-kubernetes-clusters-2ebh
Kubernetes Deployment with Ansible: A Comprehensive Guide to Bootstraping Kubernetes Clusters - DEV Community
April 21, 2024 - Execute the Ansible playbook against the inventory of nodes using the ansible-playbook command. Ansible will connect to each node via SSH and apply the defined tasks and roles, orchestrating the entire Kubernetes deployment process automatically.
🌐
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.
🌐
buildVirtual
buildvirtual.net › home › devops › deploy a kubernetes cluster using ansible
Deploy a Kubernetes Cluster using Ansible - buildVirtual
July 12, 2021 - How to Deploy a Kubernetes Cluster using Ansible Playbooks. Learn how to install Kubernetes, initialise a new Kubernetes cluster and configure worker nodes
🌐
Adam the Automator
adamtheautomator.com › ansible-kubernetes
How to Use the Ansible Kubernetes Module
Ad hoc commands are a quick and ... changes. Log onto your Ansible controller, and open your terminal, then run the ansible command below to connect to the host called web using the Kubernetes module (-m k8s)....
Published   June 4, 2023
🌐
Opensource.com
opensource.com › article › 20 › 9 › ansible-modules-kubernetes
Automate your container orchestration with Ansible modules for Kubernetes | Opensource.com
Your playbook can interact with Ansible in much the same way a configuration file does with kubectl. In fact, in many ways, the YAML you know by using Kubernetes translates to your Ansible plays. Here's a configuration you might pass directly to kubectl to deploy an image (in this example, ...
🌐
Cicd-tutorials
cicd-tutorials.net › tutorials › jenkins › ansible-kubernetes
Deploy application to Kubernetes with Ansible - CI/CD Tutorials
Ensure that branch specifier includes main branch of the repository and modify the Script Path to be docs/tutorials/jenkins/ansible-kubernetes/Jenkinsfile. The pipeline deploys an example application to a Kubernetes cluster using Ansible playbook.
🌐
Medium
medium.com › @venkataramarao.n › deploy-a-simple-sample-project-in-kubernetes-using-ansbile-script-25fa0c863962
Deploy a simple sample project in kubernetes using Ansbile script | by Venkata RamaRao Nibhanupudi | Medium
November 10, 2023 - Deploying a simple sample project end-to-end in Kubernetes using Ansible involves several steps, including setting up your Kubernetes cluster, defining Kubernetes manifests for your application, and using Ansible to automate the deployment process.