SlideShare a Scribd company logo
1 of 27
Download to read offline
Automating
Kubernetes
Environments with
Ansible
●
●
●
●
apiVersion: v1
kind: ConfigMap
metadata:
name: foo
namespace: default
data:
color: red
- name: create foo configmap
k8s:
definition:
apiVersion: v1
kind: ConfigMap
metadata:
name: foo
namespace: default
data:
color: “{{ color }}”
---
- name: create foo configmap
k8s:
definition: "{{ lookup('template', '/foo.yml') | from_yaml
}}"
$ kubectl create -f
deploy/crds/cache.example.com_memcacheds_crd.yaml
$ kubectl create -f deploy/service_account.yaml
$ kubectl create -f deploy/role.yaml
$ kubectl create -f deploy/role_binding.yaml
$ kubectl create -f deploy/operator.yaml
# we are skipping over the instructions to run sed commands or make
# manual edits to these files here.
[k8s-us-east4-test:vars]
cache_service_name: cache-service-test
cache_service_namespace: myapp
cache_service_memcached_pool_size: 3
cache_service_pool_setup: sharded
k8s_cluster_config: /path/to/gke-beta-config
[k8s-us-west1-prod:vars]
cache_service_name: cache-service-prod
cache_service_namespace: myapp
cache_service_memcached_pool_size: 9
cache_service_pool_setup: sharded
k8s_cluster_config: /path/to/gke-prod-config
apiVersion: mcrouter.example.com/v1alpha3
kind: Mcrouter
metadata:
name: {{ cache_service_name }}
namespace: {{ cache_service_namespace }}
spec:
memcached_pool_size: >
{{ cache_service_memcached_pool_size }}
- name: define cache service resource
k8s:
kubeconfig: "{{ k8s_cluster_config | default(omit) }}"
definition: "{{ lookup('template', >
'k8s-cache-service-def.yaml.j2') | from_yaml }}"
● Encode human operational knowledge
● Automatically patch, upgrade, recover, and tune
container-based apps and services
● Kubernetes-native
● Purpose-built for a specific application or service
● Enable “day 2” management
Operators simplify management of complex applications
on Kubernetes
Phase I Phase II Phase III Phase IV Phase V
Basic Install
Automated application
provisioning and
configuration management
Seamless Upgrades
Patch and minor version
upgrades supported
Full Lifecycle
App lifecycle, storage
lifecycle (backup, failure
recovery)
Deep Insights
Metrics, alerts, log
processing and workload
analysis
Auto Pilot
Horizontal/vertical scaling,
auto config tuning, abnormal
detection, scheduling tuning
K8s Operator with Ansible
your Operator image
Ansible Role
Ansible Role
watches.yaml
base Ansible Operator SDK image
Operator SDK Binary
ansible-runner
Ansible
Python + Libraries
● Initialize Your Operator With Ansible
○ $ operator-sdk new foo-operator
--api-version=cache.example.com/v1alpha1 --kind=Foo --type=ansible
● Automate With Ansible
○ Create new roles and playbooks or reuse an existing one
● Define a watches file
○ Map a Kubernetes object to your Ansible content
● Build Your Operator
○ $ operator-sdk build foo-operator:v0.0.1
● Deploy Your Operator to a Kubernetes Cluster
mcroutermcrouter-operator
21
GitOps Workflow
CI REGISTRY
DEV
CODE
REPO
CONFIG
REPO
RW
RWRO
“OPS”
RW
GitOps the Ansible Way
23
CI REGISTRY
DEV
CODE
REPO
CONFIG
REPO
R
W
R
W
R
O
“OPS”
R
W
Advantages of using Ansible
24
GitOps Beyond Cloud-Native
▸ Supports cloud-native and traditional IT
automation
▸ Integrations beyond Kubernetes such as
cloud & networking
Advantages of using Ansible
25
Flexibility To Do More
▸ Flexibility and freedom to choose what you
need
▸ Deploy, manage and automate multiple
environments thru one control plane.
▸ No dedicated GitOps “agent” required
●
●
●
●
Resources & More
27
▸ Ansible K8s Modules
・ https://docs.ansible.com/ansible/latest/modules/list_of_clustering_modules.html#k8s
▸ How Useful Is Ansible In A Cloud-Native Kubernetes Environment?
・ https://www.ansible.com/blog/how-useful-is-ansible-in-a-cloud-native-kubernetes-environment
▸ Building Kubernetes Operators in an Ansible-native way (Webinar)
・ https://www.cncf.io/webinars/building-kubernetes-operators-in-an-ansible-native-way/
▸ Creating Ansible-based Operators
・ https://docs.openshift.com/container-platform/4.5/operators/operator_sdk/osdk-ansible.html
▸ Using Ansible Automation Webhooks for GitOps
・ https://www.redhat.com/sysadmin/ansible-webhooks-gitops
▸ Guide to GitOps
・ https://www.weave.works/technologies/gitops/
Thank you

More Related Content

What's hot

7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with ElasticKangaroot
 
Orchestrating Shared Networks, Physical LB and DNS on Cloudstack
Orchestrating Shared Networks, Physical LB and DNS on CloudstackOrchestrating Shared Networks, Physical LB and DNS on Cloudstack
Orchestrating Shared Networks, Physical LB and DNS on CloudstackMarcus Vinicius Cesário
 
Streaming Sensor Data with Grafana and InfluxDB | Ryan Mckinley | Grafana
Streaming Sensor Data with Grafana and InfluxDB | Ryan Mckinley | GrafanaStreaming Sensor Data with Grafana and InfluxDB | Ryan Mckinley | Grafana
Streaming Sensor Data with Grafana and InfluxDB | Ryan Mckinley | GrafanaInfluxData
 
Kubernetes on AWS @ Zalando Tech
Kubernetes on AWS @ Zalando TechKubernetes on AWS @ Zalando Tech
Kubernetes on AWS @ Zalando TechMichael Dürgner
 
Paul Dix [InfluxData] | InfluxDays Opening Keynote | InfluxDays Virtual Exper...
Paul Dix [InfluxData] | InfluxDays Opening Keynote | InfluxDays Virtual Exper...Paul Dix [InfluxData] | InfluxDays Opening Keynote | InfluxDays Virtual Exper...
Paul Dix [InfluxData] | InfluxDays Opening Keynote | InfluxDays Virtual Exper...InfluxData
 
InfluxDB Client Libraries and Applications | Miroslav Malecha | Bonitoo
InfluxDB Client Libraries and Applications | Miroslav Malecha | BonitooInfluxDB Client Libraries and Applications | Miroslav Malecha | Bonitoo
InfluxDB Client Libraries and Applications | Miroslav Malecha | BonitooInfluxData
 
Visual Studio로 Kubernetes 사용하기
Visual Studio로 Kubernetes 사용하기Visual Studio로 Kubernetes 사용하기
Visual Studio로 Kubernetes 사용하기충섭 김
 
CNCF explore k8s_api
CNCF explore k8s_apiCNCF explore k8s_api
CNCF explore k8s_apiErhwen Kuo
 
Why Architecting for Disaster Recovery is Important for Your Time Series Data...
Why Architecting for Disaster Recovery is Important for Your Time Series Data...Why Architecting for Disaster Recovery is Important for Your Time Series Data...
Why Architecting for Disaster Recovery is Important for Your Time Series Data...InfluxData
 
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...Vietnam Open Infrastructure User Group
 
Cncf k8s_network_02
Cncf k8s_network_02Cncf k8s_network_02
Cncf k8s_network_02Erhwen Kuo
 
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...InfluxData
 
Giacomo Tirabassi [InfluxData] | Istio at InfluxData | InfluxDays Virtual Exp...
Giacomo Tirabassi [InfluxData] | Istio at InfluxData | InfluxDays Virtual Exp...Giacomo Tirabassi [InfluxData] | Istio at InfluxData | InfluxDays Virtual Exp...
Giacomo Tirabassi [InfluxData] | Istio at InfluxData | InfluxDays Virtual Exp...InfluxData
 
How to Create a Modern IIoT Monitoring Solution On iOS Using Swift, MQTT and ...
How to Create a Modern IIoT Monitoring Solution On iOS Using Swift, MQTT and ...How to Create a Modern IIoT Monitoring Solution On iOS Using Swift, MQTT and ...
How to Create a Modern IIoT Monitoring Solution On iOS Using Swift, MQTT and ...InfluxData
 
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCDDevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCDDevOps_Fest
 
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxDataHow to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxDataInfluxData
 
CNCF explore k8s api using java client
CNCF explore k8s api using java clientCNCF explore k8s api using java client
CNCF explore k8s api using java clientErhwen Kuo
 
Monitor Kubernetes in Rancher using InfluxData
Monitor Kubernetes in Rancher using InfluxDataMonitor Kubernetes in Rancher using InfluxData
Monitor Kubernetes in Rancher using InfluxDataInfluxData
 

What's hot (19)

7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic7 - Monitoring Kubernetes with Elastic
7 - Monitoring Kubernetes with Elastic
 
Orchestrating Shared Networks, Physical LB and DNS on Cloudstack
Orchestrating Shared Networks, Physical LB and DNS on CloudstackOrchestrating Shared Networks, Physical LB and DNS on Cloudstack
Orchestrating Shared Networks, Physical LB and DNS on Cloudstack
 
Streaming Sensor Data with Grafana and InfluxDB | Ryan Mckinley | Grafana
Streaming Sensor Data with Grafana and InfluxDB | Ryan Mckinley | GrafanaStreaming Sensor Data with Grafana and InfluxDB | Ryan Mckinley | Grafana
Streaming Sensor Data with Grafana and InfluxDB | Ryan Mckinley | Grafana
 
Kubernetes on AWS @ Zalando Tech
Kubernetes on AWS @ Zalando TechKubernetes on AWS @ Zalando Tech
Kubernetes on AWS @ Zalando Tech
 
Paul Dix [InfluxData] | InfluxDays Opening Keynote | InfluxDays Virtual Exper...
Paul Dix [InfluxData] | InfluxDays Opening Keynote | InfluxDays Virtual Exper...Paul Dix [InfluxData] | InfluxDays Opening Keynote | InfluxDays Virtual Exper...
Paul Dix [InfluxData] | InfluxDays Opening Keynote | InfluxDays Virtual Exper...
 
InfluxDB Client Libraries and Applications | Miroslav Malecha | Bonitoo
InfluxDB Client Libraries and Applications | Miroslav Malecha | BonitooInfluxDB Client Libraries and Applications | Miroslav Malecha | Bonitoo
InfluxDB Client Libraries and Applications | Miroslav Malecha | Bonitoo
 
Visual Studio로 Kubernetes 사용하기
Visual Studio로 Kubernetes 사용하기Visual Studio로 Kubernetes 사용하기
Visual Studio로 Kubernetes 사용하기
 
CNCF explore k8s_api
CNCF explore k8s_apiCNCF explore k8s_api
CNCF explore k8s_api
 
Why Architecting for Disaster Recovery is Important for Your Time Series Data...
Why Architecting for Disaster Recovery is Important for Your Time Series Data...Why Architecting for Disaster Recovery is Important for Your Time Series Data...
Why Architecting for Disaster Recovery is Important for Your Time Series Data...
 
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
Bare Metal Cluster with Kubernetes, Istio and Metallb | Nguyen Phuong An, Ngu...
 
Cncf k8s_network_02
Cncf k8s_network_02Cncf k8s_network_02
Cncf k8s_network_02
 
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...
Vasilis Papavasiliou [Mist.io] | Integrating Telegraf, InfluxDB and Mist to M...
 
Giacomo Tirabassi [InfluxData] | Istio at InfluxData | InfluxDays Virtual Exp...
Giacomo Tirabassi [InfluxData] | Istio at InfluxData | InfluxDays Virtual Exp...Giacomo Tirabassi [InfluxData] | Istio at InfluxData | InfluxDays Virtual Exp...
Giacomo Tirabassi [InfluxData] | Istio at InfluxData | InfluxDays Virtual Exp...
 
How to Create a Modern IIoT Monitoring Solution On iOS Using Swift, MQTT and ...
How to Create a Modern IIoT Monitoring Solution On iOS Using Swift, MQTT and ...How to Create a Modern IIoT Monitoring Solution On iOS Using Swift, MQTT and ...
How to Create a Modern IIoT Monitoring Solution On iOS Using Swift, MQTT and ...
 
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCDDevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
DevOps Fest 2020. Дмитрий Кудрявцев. Реализация GitOps на Kubernetes. ArgoCD
 
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxDataHow to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
How to Build a Monitoring Application in 20 Minutes | Russ Savage | InfluxData
 
CNCF explore k8s api using java client
CNCF explore k8s api using java clientCNCF explore k8s api using java client
CNCF explore k8s api using java client
 
Monitor Kubernetes in Rancher using InfluxData
Monitor Kubernetes in Rancher using InfluxDataMonitor Kubernetes in Rancher using InfluxData
Monitor Kubernetes in Rancher using InfluxData
 
Roman Gorshunov - Airship project onboarding
Roman Gorshunov - Airship project onboardingRoman Gorshunov - Airship project onboarding
Roman Gorshunov - Airship project onboarding
 

Similar to Automating Kubernetes Environments with Ansible

Build Your Kubernetes Operator with the Right Tool!
Build Your Kubernetes Operator with the Right Tool!Build Your Kubernetes Operator with the Right Tool!
Build Your Kubernetes Operator with the Right Tool!Rafał Leszko
 
From Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in SydneyFrom Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in SydneySK Telecom
 
[k8s] Kubernetes terminology (1).pdf
[k8s] Kubernetes terminology (1).pdf[k8s] Kubernetes terminology (1).pdf
[k8s] Kubernetes terminology (1).pdfFrederik Wouters
 
Build your operator with the right tool
Build your operator with the right toolBuild your operator with the right tool
Build your operator with the right toolRafał Leszko
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetesLiran Cohen
 
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...Tobias Schneck
 
An intro to Kubernetes operators
An intro to Kubernetes operatorsAn intro to Kubernetes operators
An intro to Kubernetes operatorsJ On The Beach
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonMyNOG
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle ManagementDoKC
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle ManagementDoKC
 
Spark with kubernates
Spark with kubernatesSpark with kubernates
Spark with kubernatesDavid Tung
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
Shakr - Container CI/CD with Google Cloud Platform
Shakr - Container CI/CD with Google Cloud PlatformShakr - Container CI/CD with Google Cloud Platform
Shakr - Container CI/CD with Google Cloud PlatformMinku Lee
 
Openshift operator insight
Openshift operator insightOpenshift operator insight
Openshift operator insightRyan ZhangCheng
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Ryan Jarvinen
 
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS Summit
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS SummitAutomatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS Summit
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS SummitAmazon Web Services
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonIvan Ma
 
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner CloudCreating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner CloudTobias Schneck
 

Similar to Automating Kubernetes Environments with Ansible (20)

Build Your Kubernetes Operator with the Right Tool!
Build Your Kubernetes Operator with the Right Tool!Build Your Kubernetes Operator with the Right Tool!
Build Your Kubernetes Operator with the Right Tool!
 
Running kubernetes
Running kubernetesRunning kubernetes
Running kubernetes
 
CKA_1st.pptx
CKA_1st.pptxCKA_1st.pptx
CKA_1st.pptx
 
From Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in SydneyFrom Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in Sydney
 
[k8s] Kubernetes terminology (1).pdf
[k8s] Kubernetes terminology (1).pdf[k8s] Kubernetes terminology (1).pdf
[k8s] Kubernetes terminology (1).pdf
 
Build your operator with the right tool
Build your operator with the right toolBuild your operator with the right tool
Build your operator with the right tool
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
 
An intro to Kubernetes operators
An intro to Kubernetes operatorsAn intro to Kubernetes operators
An intro to Kubernetes operators
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent Boon
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle Management
 
Operator Lifecycle Management
Operator Lifecycle ManagementOperator Lifecycle Management
Operator Lifecycle Management
 
Spark with kubernates
Spark with kubernatesSpark with kubernates
Spark with kubernates
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Shakr - Container CI/CD with Google Cloud Platform
Shakr - Container CI/CD with Google Cloud PlatformShakr - Container CI/CD with Google Cloud Platform
Shakr - Container CI/CD with Google Cloud Platform
 
Openshift operator insight
Openshift operator insightOpenshift operator insight
Openshift operator insight
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS Summit
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS SummitAutomatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS Summit
Automatically Scaling Your Kubernetes Workloads - SVC209-S - Anaheim AWS Summit
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner CloudCreating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
Creating Kubernetes multi clusters with ClusterAPI in the Hetzner Cloud
 

More from OlyaSurits

A Better Way for Applications to Communicate With Your Mesh
A Better Way for Applications to Communicate With Your MeshA Better Way for Applications to Communicate With Your Mesh
A Better Way for Applications to Communicate With Your MeshOlyaSurits
 
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...OlyaSurits
 
Security, Automation and the Software Supply Chain
Security, Automation and the Software Supply ChainSecurity, Automation and the Software Supply Chain
Security, Automation and the Software Supply ChainOlyaSurits
 
Full Stack Automation With Go
Full Stack Automation With GoFull Stack Automation With Go
Full Stack Automation With GoOlyaSurits
 
Implementing a Reliable, Auto-Healing Scalable Platform at VMware
Implementing a Reliable, Auto-Healing Scalable Platform at VMwareImplementing a Reliable, Auto-Healing Scalable Platform at VMware
Implementing a Reliable, Auto-Healing Scalable Platform at VMwareOlyaSurits
 
Operations as a Strategic Differentiator
Operations as a Strategic DifferentiatorOperations as a Strategic Differentiator
Operations as a Strategic DifferentiatorOlyaSurits
 
Continuous Deployment for Staging and Production Environments
Continuous Deployment for Staging and Production EnvironmentsContinuous Deployment for Staging and Production Environments
Continuous Deployment for Staging and Production EnvironmentsOlyaSurits
 
Automating the API Product Lifecycle
Automating the API Product LifecycleAutomating the API Product Lifecycle
Automating the API Product LifecycleOlyaSurits
 
APIOps: Automated Processes for Even Better APIs
APIOps: Automated Processes for Even Better APIsAPIOps: Automated Processes for Even Better APIs
APIOps: Automated Processes for Even Better APIsOlyaSurits
 
The Building Blocks of DX: K8s Evolution from CLI to GitOps
The Building Blocks of DX: K8s Evolution from CLI to GitOpsThe Building Blocks of DX: K8s Evolution from CLI to GitOps
The Building Blocks of DX: K8s Evolution from CLI to GitOpsOlyaSurits
 
Connectivity Is the Future
Connectivity Is the FutureConnectivity Is the Future
Connectivity Is the FutureOlyaSurits
 
The 7 Habits of Highly Effective Automators
The 7 Habits of Highly Effective AutomatorsThe 7 Habits of Highly Effective Automators
The 7 Habits of Highly Effective AutomatorsOlyaSurits
 

More from OlyaSurits (12)

A Better Way for Applications to Communicate With Your Mesh
A Better Way for Applications to Communicate With Your MeshA Better Way for Applications to Communicate With Your Mesh
A Better Way for Applications to Communicate With Your Mesh
 
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
 
Security, Automation and the Software Supply Chain
Security, Automation and the Software Supply ChainSecurity, Automation and the Software Supply Chain
Security, Automation and the Software Supply Chain
 
Full Stack Automation With Go
Full Stack Automation With GoFull Stack Automation With Go
Full Stack Automation With Go
 
Implementing a Reliable, Auto-Healing Scalable Platform at VMware
Implementing a Reliable, Auto-Healing Scalable Platform at VMwareImplementing a Reliable, Auto-Healing Scalable Platform at VMware
Implementing a Reliable, Auto-Healing Scalable Platform at VMware
 
Operations as a Strategic Differentiator
Operations as a Strategic DifferentiatorOperations as a Strategic Differentiator
Operations as a Strategic Differentiator
 
Continuous Deployment for Staging and Production Environments
Continuous Deployment for Staging and Production EnvironmentsContinuous Deployment for Staging and Production Environments
Continuous Deployment for Staging and Production Environments
 
Automating the API Product Lifecycle
Automating the API Product LifecycleAutomating the API Product Lifecycle
Automating the API Product Lifecycle
 
APIOps: Automated Processes for Even Better APIs
APIOps: Automated Processes for Even Better APIsAPIOps: Automated Processes for Even Better APIs
APIOps: Automated Processes for Even Better APIs
 
The Building Blocks of DX: K8s Evolution from CLI to GitOps
The Building Blocks of DX: K8s Evolution from CLI to GitOpsThe Building Blocks of DX: K8s Evolution from CLI to GitOps
The Building Blocks of DX: K8s Evolution from CLI to GitOps
 
Connectivity Is the Future
Connectivity Is the FutureConnectivity Is the Future
Connectivity Is the Future
 
The 7 Habits of Highly Effective Automators
The 7 Habits of Highly Effective AutomatorsThe 7 Habits of Highly Effective Automators
The 7 Habits of Highly Effective Automators
 

Recently uploaded

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Recently uploaded (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Automating Kubernetes Environments with Ansible

  • 2.
  • 4. apiVersion: v1 kind: ConfigMap metadata: name: foo namespace: default data: color: red - name: create foo configmap k8s: definition: apiVersion: v1 kind: ConfigMap metadata: name: foo namespace: default data: color: “{{ color }}”
  • 5. --- - name: create foo configmap k8s: definition: "{{ lookup('template', '/foo.yml') | from_yaml }}"
  • 6.
  • 7.
  • 8. $ kubectl create -f deploy/crds/cache.example.com_memcacheds_crd.yaml $ kubectl create -f deploy/service_account.yaml $ kubectl create -f deploy/role.yaml $ kubectl create -f deploy/role_binding.yaml $ kubectl create -f deploy/operator.yaml # we are skipping over the instructions to run sed commands or make # manual edits to these files here.
  • 9.
  • 10.
  • 11. [k8s-us-east4-test:vars] cache_service_name: cache-service-test cache_service_namespace: myapp cache_service_memcached_pool_size: 3 cache_service_pool_setup: sharded k8s_cluster_config: /path/to/gke-beta-config [k8s-us-west1-prod:vars] cache_service_name: cache-service-prod cache_service_namespace: myapp cache_service_memcached_pool_size: 9 cache_service_pool_setup: sharded k8s_cluster_config: /path/to/gke-prod-config apiVersion: mcrouter.example.com/v1alpha3 kind: Mcrouter metadata: name: {{ cache_service_name }} namespace: {{ cache_service_namespace }} spec: memcached_pool_size: > {{ cache_service_memcached_pool_size }} - name: define cache service resource k8s: kubeconfig: "{{ k8s_cluster_config | default(omit) }}" definition: "{{ lookup('template', > 'k8s-cache-service-def.yaml.j2') | from_yaml }}"
  • 12.
  • 13. ● Encode human operational knowledge ● Automatically patch, upgrade, recover, and tune container-based apps and services ● Kubernetes-native ● Purpose-built for a specific application or service ● Enable “day 2” management Operators simplify management of complex applications on Kubernetes
  • 14. Phase I Phase II Phase III Phase IV Phase V Basic Install Automated application provisioning and configuration management Seamless Upgrades Patch and minor version upgrades supported Full Lifecycle App lifecycle, storage lifecycle (backup, failure recovery) Deep Insights Metrics, alerts, log processing and workload analysis Auto Pilot Horizontal/vertical scaling, auto config tuning, abnormal detection, scheduling tuning
  • 15.
  • 16. K8s Operator with Ansible
  • 17. your Operator image Ansible Role Ansible Role watches.yaml base Ansible Operator SDK image Operator SDK Binary ansible-runner Ansible Python + Libraries
  • 18. ● Initialize Your Operator With Ansible ○ $ operator-sdk new foo-operator --api-version=cache.example.com/v1alpha1 --kind=Foo --type=ansible ● Automate With Ansible ○ Create new roles and playbooks or reuse an existing one ● Define a watches file ○ Map a Kubernetes object to your Ansible content ● Build Your Operator ○ $ operator-sdk build foo-operator:v0.0.1 ● Deploy Your Operator to a Kubernetes Cluster
  • 20.
  • 22. GitOps the Ansible Way 23 CI REGISTRY DEV CODE REPO CONFIG REPO R W R W R O “OPS” R W
  • 23. Advantages of using Ansible 24 GitOps Beyond Cloud-Native ▸ Supports cloud-native and traditional IT automation ▸ Integrations beyond Kubernetes such as cloud & networking
  • 24. Advantages of using Ansible 25 Flexibility To Do More ▸ Flexibility and freedom to choose what you need ▸ Deploy, manage and automate multiple environments thru one control plane. ▸ No dedicated GitOps “agent” required
  • 26. Resources & More 27 ▸ Ansible K8s Modules ・ https://docs.ansible.com/ansible/latest/modules/list_of_clustering_modules.html#k8s ▸ How Useful Is Ansible In A Cloud-Native Kubernetes Environment? ・ https://www.ansible.com/blog/how-useful-is-ansible-in-a-cloud-native-kubernetes-environment ▸ Building Kubernetes Operators in an Ansible-native way (Webinar) ・ https://www.cncf.io/webinars/building-kubernetes-operators-in-an-ansible-native-way/ ▸ Creating Ansible-based Operators ・ https://docs.openshift.com/container-platform/4.5/operators/operator_sdk/osdk-ansible.html ▸ Using Ansible Automation Webhooks for GitOps ・ https://www.redhat.com/sysadmin/ansible-webhooks-gitops ▸ Guide to GitOps ・ https://www.weave.works/technologies/gitops/