Will Thames

Author Archives: Will Thames

Continuous Improvements in Ansible and Kubernetes Automation

blog_ansible-and-kubernetes-deep-dive

Ansible is an ideal tool for managing many different types of Kubernetes resources. There are four key features that really help:

  • Modules and plugins for creating, updating, removing and obtaining information about Kubernetes resources
  • Templating of Kubernetes resource definitions
  • Powerful inventory system
  • Secrets management 

Together these combine to help enable repeatable deployment and management of applications and multiple Kubernetes clusters in a single role for every resource.

Since the last blog post on Kubernetes features for Ansible Engine 2.6, there have been a number of improvements to Ansible's Kubernetes capabilities. Let’s go over some of the improvements to the modules and libraries and other new features that have been added in the last year, and also highlight what is in the works.

 

New features

Better change management through apply mode

The k8s module now accepts an apply parameter, which approximates the behavior of kubectl apply. When apply is set to True, the k8s module will store the last applied configuration in an annotation on the object. When the object already exists, instead of just sending the new manifest to the API server, the module will now do a 3-way merge, combining the existing cluster state, the Continue reading