Operators - The Future of Kubernetes

Slides:



Advertisements
Similar presentations
MODULE 3: OS & APP LAYERS. Agenda Preparing and importing a gold image Creating and understanding Install Machines Creating basic Application layers Understanding.
Advertisements

Designing, Deploying and Managing Workflow in SharePoint Sites Steve Heaney Product Development Manager OBS
 Visual Studio has great support for building ASP.NET web applications  Real web application development involves more than just copying the files created.
Google App Engine Google APIs OAuth Facebook Graph API
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
Drupal Commerce Better than Uber Andrew Root: druroot.
11 CORE Architecture Mauro Bruno, Monica Scannapieco, Carlo Vaccari, Giulia Vaste Antonino Virgillito, Diego Zardetto (Istat)
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Wordpress with Mina Automated Deployment Solution Jonathan Gravato DIG 4104c.
11 CORE Architecture Mauro Bruno, Monica Scannapieco, Carlo Vaccari, Giulia Vaste Antonino Virgillito, Diego Zardetto (Istat)
SONIC-3: Creating Large Scale Installations & Deployments Andrew S. Neumann Principal Engineer Progress Sonic.
1 Service Creation, Advertisement and Discovery Including caCORE SDK and ISO21090 William Stephens Operations Manager caGrid Knowledge Center February.
Infrastructure as code. “Enable the reconstruction of the business from nothing but a source code repository, an application data backup, and bare metal.
Hyperion Artifact Life Cycle Management Agenda  Overview  Demo  Tips & Tricks  Takeaways  Queries.
V7 Foundation Series Vignette Education Services.
Configuration & Registry Microservice Deep Dive
Progress Apama Fundamentals
Architecture Review 10/11/2004
Building Enterprise Applications Using Visual Studio®
Containers as a Service with Docker to Extend an Open Platform
Deployment Architectures For Containers
Useful Tools for Testing
Working in the Forms Developer Environment
Dockerize OpenEdge Srinivasa Rao Nalla.
Building Regression Tests With PeopleSoft Test Framework
Tulika Chaudharie / Harikharan Krishnaraju
Deploy, Manage, and Scale Your Apps with OpsWorks, Elastic Beanstalk, and CodeDeploy Part 1 – Elastic Beanstalk © 2017 Amazon Web Services, Inc. and.
MANAGE AWS INFRASTRUCTURE AS CODE USING TERRAFORM
System Design.
Logo here Module 3 Microsoft Azure Web App. Logo here Module Overview Introduction to App Service Overview of Web Apps Hosting Web Applications in Azure.
IT Atoumation / Conf. Mgmt...
Continuous Deployment tool
Andrew Pruski SQL Server & Containers
Maintaining software solutions
Advanced Integration and Deployment Techniques
Usecase 1 – Upgrade Image
CAE-SCRUB for Incorporating Static Analysis into Peer Reviews
Enhancing Cloud Foundry with CLI Plugins
Service Fabric Patterns & Best Practices
Kubernetes Container Orchestration
Intro to Config Management Using Salt Open Source
Dev Test on Windows Azure Solution in a Box
Service Metadata Registry (COSMOS)
Confidential – Oracle Internal/Restricted/Highly Restricted
Simplified Development Toolkit
Introduction to Ansible
Sr. Developer Cloud System - Architecture
Getting Started with Kubernetes and Rancher 2.0
Presented By - Avinash Pawar
In this session… Introduce what we’re talking about
From Source to Production: The Latest in Container Dev
Course: Module: Lesson # & Name Instructional Material 1 of 32 Lesson Delivery Mode: Lesson Duration: Document Name: 1. Professional Diploma in ERP Systems.
Cordova & Cordova Plugin Installation and Management
Automating and Validating Edits
Technical Capabilities
Overview of Workflows: Why Use Them?
TechEd /23/2019 9:23 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
OpenShift as a cloud for Data Science
Service Template Creation from the Ground Up
Carthage ios 8 onwards Dependency manager that streamlines the process of integrating the libraries into the project.
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Securing IaaS in the cloud
A DevOps process for deploying R to production
Empowering teams with scalable Shiny applications
Ponder policy toolkit Jovana Balkoski, Rashid Mijumbi
ONAP and ONAP Edge Orchestration Cloud Native Proposal
EKSE: A Command Line Interface for EGS-CC based Systems
ONAP Architecture Principle Review
Presentation transcript:

Operators - The Future of Kubernetes 2018-02-21 Operators - The Future of Kubernetes Hands-On Workshops On Operators and Tekton Krishna Venkata Laxmikanth Vajinapally Shabrinath Motamary

Agenda Stateless Vs StateFul What is an Operator? Operator Framework Operators Types Best Practices Hands-on Go Based Operator What is Tekton ? Tekton CRDs Hands-On Tekton Pipeline

Stateless Vs Stateful Applications Kubernetes provides powerful in built features to deploy stateless applications e.g. Web Apps Can be destroyed, relocated and upgrade easily. Service Exposes deployments. Stateful Requires domain Knowledge to Deploy, Manage and Scale e.g. Databases. Application specific notions of clustering and interconnectivity. Coordination for authorization and authentication of members. Coordination while scaling in and out. Complex application specific Backup, Healing and life cycle management

Kubernetes Doesn’t and Operators Does This is where Operators Come in, all the cons of Stateful can be achieved by Operators. Operators fill the gap of the application specific things that Kubernetes can’t do. Operators extend Kubernetes functionality. Human experience as code. Focus on desired state. Complex, Manual Operational tasks become a single line of Config.

What is Operator? “An Operator is a method of packaging, deploying and managing a Kubernetes application. A Kubernetes application is an application that is both deployed on Kubernetes and managed using the Kubernetes APIs and kubectl tooling.”

Operator Custom Resources Definition Application knowledge Custom Controller Application knowledge Operator

Application Knowledge Deploy Upgrades Scale Backup Self-Heal/Repair

Operator Interaction With Kubernetes Operators take advantage of Custom Resource Definition(CRD). CRD’s are extensions of the Kubernetes API to register new Resource. Creating a Custom Resource(CR) from CRD’s. Operator monitors for new CR request, acknowledges and creates the CR. It Can be used like any other native Kubernetes Resource.

When to Choose Creating A Operator? Business logic is required. Application uses a declarative API. Automation that watches for updates of Kubernetes object. Create or update resources using Kubernetes API.

Etcd Operator Cluster A has 3 Running Pods Name: summit-etcd-0 Version 2.9.1 Name: summit-etcd-1 Version 2.9.2 Name: summit-etcd-1 Version 2.9.1 Desired = False Difference in Configuration Version should be 2.9.2 Cluster Clean, Backup Cluster Upgrade to 2.9.2 Observe Etcd Operator Analyze Act

Operator Framework Operator SDK Supports developers in bootstrapping and building an Operator based on their expertise without requiring knowledge of Kubernetes API complexities Operator Lifecycle Manager Helps you to install, update, and generally manage the lifecycle of all of the operators (and their associated services) running across your clusters Operator Metering Metering records historical cluster usage, and can generate usage reports showing usage breakdowns by pod or namespace over arbitrary time periods

Operator Types Using Operator SDK What the SDK generates What you need to define Go Operator General go program structure Boilerplate code to talk to the Kubernetes API Boilerplate code to watch for Kubernetes objects of interest An entry point to the reconciliation loop Custom objects via CRDs Control loop logic in Go Ansible Operator A Go program that runs an Ansible playbook or role every time a certain type of object is detected / modified Custom objects via CRD Helm Operator A Go program that reads a helm chart and deploys all its resources Watch statements to detect changes in the custom objects specification, re-deploying all resources with updated values The location / repository of the helm chart

Maturity Models of Operators

Project Layout For Go Based Operator SDK File/Folders Purpose cmd Contains manager/main.go which is the main program of the operator. This instantiates a new manager which registers all custom resource definitions under pkg/apis/... and starts all controllers under pkg/controllers/... . pkg/apis Contains the directory tree that defines the APIs of the Custom Resource Definitions(CRD). Users are expected to edit the pkg/apis/<group>/<version>/<kind>_types.go files to define the API for each resource type and import these packages in their controllers to watch for these resource types. pkg/controller This pkg contains the controller implementations. Users are expected to edit the pkg/controller/<kind>/<kind>_controller.go to define the controller's reconcile logic for handling a resource type of the specified kind. build Contains the Dockerfile and build scripts used to build the operator. deploy Contains various YAML manifests for registering CRDs, setting up RBAC, and deploying the operator as a Deployment. go.mod go.sum The Go mod manifests that describe the external dependencies of this operator. vendor The golang vendor directory that contains local copies of external dependencies that satisfy Go imports in this project. Go modules manages the vendor directory directly. This directory will not exist unless the project is initialized with the --vendor flag, or go mod vendor is run in the project root.

Watch

Reconcile

Operator Best Practices Resource Reconciliation Cycle Instance Validity Instance Initialization Instance Deletion Resource Validation Syntactic validation Semantic validation Validating a resource in the controller

..continued Resource Initialization Resource Ownership Managing status

Operatorhub.io

Awesome Operators ..!! Rook Rook-Ceph Rook-EdgeFS Kube-Virt Tomcat and Many More

Operators Hands-on Demo In this demo, we will build a GO-based Operator called Cloner. The project name is openinfra-summit. kind is kind: Cloner Create a project using the operator-sdk command line. Add a new CRD API. Update cloner_types.go as required with custom Specs and Status  to deploy our application Cloner. Run generate k8s and openapi  to update the generated code for that resource type. Add a new Controller. Register our new CRD with Kubernetes APIServer. Setup RBAC and Deploy our new application called Cloner.

Operators Hands-On

Operator: Tekton What is Tekton: Tekton itself is an Operator. Tekton is an open source framework to configure and run CI/CD pipelines within a Kubernetes cluster. Tekton is deployed on Kubernetes. Installation: kubectl apply --filename https://storage.googleapis.com/tekton- releases/pipeline/previous/v0.7.0/release.yaml

Tekton: CRDs Operator= CRDs + Domain specific knowledge + Controller CRDs : Custom Resource Definitions Extending Kubernetes APIs Once installed, Users can create and access its objects using kubectl Controller : Controllers act on Resources to maintains desired state.

Tekton: CRDs Task Pipeline TaskRun PipelineRun PipelineResource

Task Task: Contains multiple steps Steps are executed sequentially Every Task is a Pod Takes input and output parameters Step: Smallest Building block of a Task Not a CRD Each step is a container Runs commands within the container

Pipeline Tasks can be executed in any order using Pipeline Links output and input of Tasks Triggered using PipelineRuns Task Task Task Task Task

PipelineResource Predefined input/output Used as input and output of Tasks Most common resource types are Git and Image

PipelineRun and TaskRun PipelineRun and TaskRun are created to trigger Pipeline and Task respectively. PipelineRun creation triggers creation of TaskRuns PipelineRun uses PVC to share resources between Tasks

Tekton CRDs Overview Task, Pipeline are declared once and re-used. TaskRun, PipelineRun are used to invoke respective Tasks and Pipelines. PipelineResource provides runtime info like Git repo, Image registry to Runs. Pipeline Resource Task PipelineRun

Tekton: CRDs Native resources: Pod, Deployment, Service, Ingress etc Tekton resources: Task, Pipeline, PipelineRun, TaskRun etc

Tekton Hands-On Demo This pipeline demonstrates creating an container image from Dockerfile and pushing the newly created image to Dockerhub. Overview of Steps Involved Creating pipeline resources for Git repo and DockerHub Creating Task Creating TaskRun to invoke Task Follow steps from: https://github.com/kvenkata986/shanghai- summit/tree/master/tekton

Tekton Pipeline Flow PipelineResource TaskRun Task PipelineResource

1.PipelineResource

1.PipelineResource 2. Task

1.PipelineResource 3.TaskRun 2. Task

Tekton Hands-On

GitHub: https://github GitHub: https://github.com/kvenkata986/shanghai-summit Blog: https://kvenkata986.github.io

2018-02-21 Questions ? Thank You !