SlideShare a Scribd company logo
Workshop
Vic Iglesias
Cloud Solutions Architect
@vicnastea
Agenda
● What is Tekton?
● Just Enough Kubernetes
● Tekton
○ Custom Resources
○ Subprojects
○ Roadmap
● Hands-on Lab
○ Hello world!
○ Hackathon
What is Tekton?
● Open API spec for
describing CI/CD pipelines
● Open-source CI/CD
platform implementation
running on Kubernetes
● In Alpha - version v0.5.x
● Openly-governed under the
Continuous Delivery
Foundation (CDF)
What is Tekton?
● Currently 4 projects
● Contributions from:
○ Google
○ Red Hat
○ IBM
○ CloudBees
What is the Continuous Delivery Foundation (CDF)?
The Tekton Story
2018 2019
Knative
build
Tekton
Pipelines
Knative
build-pipelines Tekton ++
Tekton Goals
Composable Declarative
Reproducible Cloud Native
Just Enough Kubernetes
● A portable, open-source container
orchestration platform
● Built-in primitives for deployments, rolling
upgrades, scaling, monitoring, and more
● Inspired by Google’s internal system (borg)
What is Kubernetes?
10
> kubectl
Control Plane
API Server
Scheduler
App State
Control Loops
App
Node 1
App
Node 2
App
Node n
API, CLI, CI/CD
Ingress
Kubernetes Arch
Intra-cluster
networking
Users
Pods
The atomic Kubernetes object that
represents a single instance of an
application.
The Pod acts as a logical host for one
or n containers comprising an
application.
These containers have a shared fate,
key to any clustering system.
container container container
volume A volume B
network interface
Pods
Containers in a pod share a network and
mount namespace and therefore
communicate via localhost.
Containers in a pod are assigned individual
cgroups, allowing for resource requests
and limits on a per container basis.
Kubernetes schedules and orchestrates
Pods across nodes in a cluster.
container container container
volume A volume B
network interface
Pods
nodemaster node node
apiVersion: v1
kind: Pod
metadata:
name: my-app
spec:
containers:
- name: my-app
image: gcr.io/project/my-app
- name: nginx-ssl
image: gcr.io/project/nginx
ports:
- containerPort: 80
- containerPort: 443
Pods
nodemaster node node
apiVersion: v1
kind: Pod
metadata:
name: my-app
spec:
containers:
- name: my-app
image: gcr.io/project/my-app
- name: nginx-ssl
image: gcr.io/project/nginx
ports:
- containerPort: 80
- containerPort: 443
Pods
nodemaster node node
apiVersion: v1
kind: Pod
metadata:
name: my-app
spec:
containers:
- name: my-app
image: gcr.io/project/my-app
- name: nginx-ssl
image: gcr.io/project/nginx
ports:
- containerPort: 80
- containerPort: 443
Custom Resource
Definitions
CRDs
When?
● You want to create a
new kind of object
● You want to
package multiple
objects as one
What?
● Extension of the
Kubernetes API
● You write the spec
and build a
controller
Where?
● Docs:
https://kubernetes.io/docs/conc
epts/extend-kubernetes/api-ex
tension/custom-resources/
Example CRD
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: securedeployments.ctl.gcp.solutions
spec:
group: ctl.gcp.solutions
version: v1
scope: Namespaced
names:
plural: securedeployments
singular: securedeployment
kind: SecureDeployment
shortNames: ["sd", "securedeploy"] $ kubectl get sd
$ kubectl describe securedeploy
The Operator Pattern
Operators
When?
● You want to own the
lifecycle of a
package of objects
● You want to model
and control external
services
What?
● A design pattern for
custom resources
● Implements
complex controllers
for CRDs
How?
● Operator-SDK:
https://github.com/operator-fra
mework/operator-sdk
● Kubebuilder:
https://github.com/kubernetes-
sigs/kubebuilder
Observe, analyze, act
apiserver
watch
CRD
Objects
custom
controller
CRUD
Child
objects
CRD
Object Object Object
Children
CRUD
External
● Tekton defines some Custom Resources
● Tekton runs controllers to reconcile resource status toward the desired state
● That's all Tekton is:
○ Open API (CRDs)
○ Kubernetes controllers that know how to handle them
Back to Tekton!
Tekton Architecture
Task Pipeline Pipeline
Resource
> tkn
Tekton Custom Resources
Tekton Custom Resource Definition
Pipeline
Task
git
Task
image
Task
Task
cluster
cluster
Pipeline
Resource
Pipeline
Resource
Step
Step
Step
Step
Step
Step
Step
Step
● Stateless, reusable,
parameterized task definition
● Defines steps to run,
parameters, inputs and
outputs
Tekton CRD: Task
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: go-something
spec:
inputs:
parameters:
- name: command
steps:
- name: go-something
image: golang:stretch
command: ['go', '${inputs.parameters.command}']
Running a Task
● Create a TaskRun that
references the Task
● Provide required parameters
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
generateName: go-build-
spec:
taskRef:
name: go-build
inputs:
params:
- name: command
value: build
Tekton CRD: TaskRun
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
generateName: go-version-
spec:
taskSpec:
steps:
- name: go-version
image: golang:stretch
command: ['go', 'version']
● When created, starts doing work
● Defines steps to run in order
○ /workspace volume shared across
steps
● Defines input source(s) to fetch and
mount into /workspace
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
generateName: go-version-
spec:
taskSpec:
steps:
- name: go-version
image: golang:stretch
command: ['go', 'version']
TaskRun Controller
● Watches for new TaskRuns
● Creates a Pod to run specified steps in order
● Watches Pod for status updates
apiVersion: v1
kind: Pod
metadata:
name: go-version-blah-pod-blah
spec:
containers:
…
- name: go-version
image: golang:stretch
command: ['go', 'version']
…
create
updates
updates
updates
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
name: go-version-mxylp
spec:
taskSpec:
steps:
- name: go-version
image: golang:stretch
command: ['go', 'version']
…
status:
startTime: 2019-06-14T05:43:49Z
completionTime: 2019-06-14T05:53:33Z
conditions:
- type: Succeeded
status: True
podName: go-version-blah-pod-blah
steps:
- name: go-version
terminated:
exitCode: 0
startedAt: 2019-06-14T05:45:52Z
finishedAt: 2019-06-14T05:46:52Z
● Populates status based on
Pod status
TaskRun Controller
● Timeout
● Resource requests and limits
○ "K8s: This needs 3.25 CPUs and 17.84 GB of RAM" -- can get more resources if available
○ "K8s: Stop it from using more than 8 CPU"
● Node and Pod affinity
○ "K8s: I can tolerate being put on a preemptible VM; I'm not that important"
○ "K8s: I require a node with 4 GPUs; I'm kind of a big deal"
○ "K8s: Try to schedule me on the same node as $otherpod, but if not nbd"
● Persistent Volume Claims
○ "K8s: attach a Persistent Disk at /cache so I can write to it"
○ "K8s: attach that same disk again at /cache so I can read from it"
○ Kubernetes schedules Pods to Nodes with necessary PDs attached
○ Incremental builds!
TaskRun Features
Tekton Resource: PipelineResource
● Defines an entity that can act as a Task input
or output
● Source inputs are placed into
/workspace/${resourceName}
● Can be referenced in Tasks
● Examples:
○ Git repo
○ Container image
○ Test result
○ GitHub PR
○ Kubernetes Cluster
Using PipelineResources
=== taskrun.yaml ===
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
generateName: go-build-
spec:
taskRef:
name: go-build
inputs:
resources:
- name: source
resourceSpec:
type: git
params:
- name: url
value: https://github.com/my/repo
=== task.yaml ===
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: go-build
spec:
inputs:
resources:
- name: source
type: git
steps:
- image: golang:stretch
workingdir: /workspace/source
command: ['go', 'build', './...']
Pipeline
Tekton Resources: Pipeline and PipelineRun
● Pipelines are stateless, reusable, parameterized collections of Tasks
○ PipelineRuns are running instantiations of Pipelines, obviously
● Tasks linked by input and output PipelineResources
○ Task A produces a container image, Task B takes that container image and deploys it
○ ...or with order explicitly defined (just run A then B)
Task
git
Task
image
Task
Task
deploy
deploy
cluster
cluster
Tekton Subprojects
● Simple to use and deploy Web
UI for Tekton Pipelines
● Similar in spirit to the
Kubernetes Dashboard
● Provides reusable Tekton Web
UI components
Tekton Dashboard
● Library of commonly used
tasks
● Parameterized to capture
many use cases
● Examples
○ Kaniko for daemon-less image
building
○ Buildpacks to go from source
code to Docker images without a
Dockerfile
Tekton Catalog
Tekton Roadmap
1.0 / Beta
(Currently at alpha)
Tekton Pipelines 2019
https://github.com/tektoncd/pipeline/blob/master/roadmap-2019.md
Tekton Pipelines 2019
Q2 Q3 + Q4
A complete CI/CD
solution
Event triggering
Log persistence
SCM support
Moar cool stuff
Tekton Pipelines 2019 Q2
Requirements Design Implementation
Event triggering
Log uploading
SCM Support
{
CompleteCIsolution
Tekton Pipelines 2019 Q3 + Q4
Requirements Design Implementation
Sidecar Support
Conditional Execution
PipelineResource Extensibility
Task Extensibility
Images Outputs
Catalog Integration
Pause + Resume
Partial execution
Access control
Performance SLOs
Config as code
Notifications
CRD persistence
PipelineResource Factory
Test “framework”
Not started
10 minute break...
Hands-on Lab
Logging in to your lab account
Use an incognito window:
1. Go to https://console.cloud.google.com
2. Log in with the username and password given to
you in the handout
3. In a new tab open up the following page for the
lab procedure:
https://github.com/viglesiasce/tekton-workshop

More Related Content

What's hot

Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
Kumar Shìvam
 
CI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cdCI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cd
Billy Yuen
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
CloudOps2005
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
sparkfabrik
 
Extending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsExtending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitions
Stefan Schimanski
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Michael O'Sullivan
 
Helm - Application deployment management for Kubernetes
Helm - Application deployment management for KubernetesHelm - Application deployment management for Kubernetes
Helm - Application deployment management for Kubernetes
Alexei Ledenev
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
Md. Minhazul Haque
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
Brice Fernandes
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
Steffen Gebert
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
David Hahn
 
Kubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best PracticesKubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best Practices
Ajeet Singh Raina
 
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
OPENSHIFT CONTAINER PLATFORM CI/CD Build & DeployOPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
Natale Vinto
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
Janakiram MSV
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
Megan O'Keefe
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Sunnyvale
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Rishabh Indoria
 
CI-Jenkins.pptx
CI-Jenkins.pptxCI-Jenkins.pptx
CI-Jenkins.pptx
MEDOBEST1
 

What's hot (20)

Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
 
CI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cdCI:CD in Lightspeed with kubernetes and argo cd
CI:CD in Lightspeed with kubernetes and argo cd
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Extending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsExtending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitions
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
 
Helm - Application deployment management for Kubernetes
Helm - Application deployment management for KubernetesHelm - Application deployment management for Kubernetes
Helm - Application deployment management for Kubernetes
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines(Declarative) Jenkins Pipelines
(Declarative) Jenkins Pipelines
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
Kubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best PracticesKubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best Practices
 
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
OPENSHIFT CONTAINER PLATFORM CI/CD Build & DeployOPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
CI-Jenkins.pptx
CI-Jenkins.pptxCI-Jenkins.pptx
CI-Jenkins.pptx
 

Similar to Introduction to Tekton

Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifest
LibbySchulze
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
Opsta
 
Introducing Koki Short
Introducing Koki ShortIntroducing Koki Short
Introducing Koki Short
Sidhartha Mani
 
Introduction to Kubernetes and GKE
Introduction to Kubernetes and GKEIntroduction to Kubernetes and GKE
Introduction to Kubernetes and GKE
Opsta
 
Knative build for open whisk runtimes phase 1 - 2018-02-20
Knative build for open whisk runtimes   phase 1 - 2018-02-20Knative build for open whisk runtimes   phase 1 - 2018-02-20
Knative build for open whisk runtimes phase 1 - 2018-02-20
Matt Rutkowski
 
Kubernetes best practices
Kubernetes best practicesKubernetes best practices
Kubernetes best practices
Bill Liu
 
CI/CD Across Multiple Environments
CI/CD Across Multiple EnvironmentsCI/CD Across Multiple Environments
CI/CD Across Multiple Environments
Karl Isenberg
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
Amir Moghimi
 
How to build a tool for operating Flink on Kubernetes
How to build a tool for operating Flink on KubernetesHow to build a tool for operating Flink on Kubernetes
How to build a tool for operating Flink on Kubernetes
AndreaMedeghini
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
Bob Killen
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
Liran Cohen
 
Kubernetes Node Deep Dive
Kubernetes Node Deep DiveKubernetes Node Deep Dive
Kubernetes Node Deep Dive
Lei (Harry) Zhang
 
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
All Things Open
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
Patrick Chanezon
 
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdfGetting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
ssuser348b1c
 
Kubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and ServicesKubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and Services
Jian-Kai Wang
 
Docker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker eeDocker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker ee
Docker, Inc.
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
Akihiro Suda
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
corehard_by
 

Similar to Introduction to Tekton (20)

Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifest
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
 
Introducing Koki Short
Introducing Koki ShortIntroducing Koki Short
Introducing Koki Short
 
Introduction to Kubernetes and GKE
Introduction to Kubernetes and GKEIntroduction to Kubernetes and GKE
Introduction to Kubernetes and GKE
 
Knative build for open whisk runtimes phase 1 - 2018-02-20
Knative build for open whisk runtimes   phase 1 - 2018-02-20Knative build for open whisk runtimes   phase 1 - 2018-02-20
Knative build for open whisk runtimes phase 1 - 2018-02-20
 
Kubernetes best practices
Kubernetes best practicesKubernetes best practices
Kubernetes best practices
 
CI/CD Across Multiple Environments
CI/CD Across Multiple EnvironmentsCI/CD Across Multiple Environments
CI/CD Across Multiple Environments
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
How to build a tool for operating Flink on Kubernetes
How to build a tool for operating Flink on KubernetesHow to build a tool for operating Flink on Kubernetes
How to build a tool for operating Flink on Kubernetes
 
Kubernetes: The Next Research Platform
Kubernetes: The Next Research PlatformKubernetes: The Next Research Platform
Kubernetes: The Next Research Platform
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Kubernetes Node Deep Dive
Kubernetes Node Deep DiveKubernetes Node Deep Dive
Kubernetes Node Deep Dive
 
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
 
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdfGetting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
Getting-Started-with-Containers-and-Kubernetes_-March-2020-CNCF-Webinar.pdf
 
Kubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and ServicesKubernetes Basis: Pods, Deployments, and Services
Kubernetes Basis: Pods, Deployments, and Services
 
Docker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker eeDocker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker ee
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 

Recently uploaded

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 

Recently uploaded (20)

Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

Introduction to Tekton

  • 2. Agenda ● What is Tekton? ● Just Enough Kubernetes ● Tekton ○ Custom Resources ○ Subprojects ○ Roadmap ● Hands-on Lab ○ Hello world! ○ Hackathon
  • 4. ● Open API spec for describing CI/CD pipelines ● Open-source CI/CD platform implementation running on Kubernetes ● In Alpha - version v0.5.x ● Openly-governed under the Continuous Delivery Foundation (CDF) What is Tekton?
  • 5. ● Currently 4 projects ● Contributions from: ○ Google ○ Red Hat ○ IBM ○ CloudBees What is the Continuous Delivery Foundation (CDF)?
  • 6. The Tekton Story 2018 2019 Knative build Tekton Pipelines Knative build-pipelines Tekton ++
  • 9. ● A portable, open-source container orchestration platform ● Built-in primitives for deployments, rolling upgrades, scaling, monitoring, and more ● Inspired by Google’s internal system (borg) What is Kubernetes?
  • 10. 10 > kubectl Control Plane API Server Scheduler App State Control Loops App Node 1 App Node 2 App Node n API, CLI, CI/CD Ingress Kubernetes Arch Intra-cluster networking Users
  • 11. Pods The atomic Kubernetes object that represents a single instance of an application. The Pod acts as a logical host for one or n containers comprising an application. These containers have a shared fate, key to any clustering system. container container container volume A volume B network interface
  • 12. Pods Containers in a pod share a network and mount namespace and therefore communicate via localhost. Containers in a pod are assigned individual cgroups, allowing for resource requests and limits on a per container basis. Kubernetes schedules and orchestrates Pods across nodes in a cluster. container container container volume A volume B network interface
  • 13. Pods nodemaster node node apiVersion: v1 kind: Pod metadata: name: my-app spec: containers: - name: my-app image: gcr.io/project/my-app - name: nginx-ssl image: gcr.io/project/nginx ports: - containerPort: 80 - containerPort: 443
  • 14. Pods nodemaster node node apiVersion: v1 kind: Pod metadata: name: my-app spec: containers: - name: my-app image: gcr.io/project/my-app - name: nginx-ssl image: gcr.io/project/nginx ports: - containerPort: 80 - containerPort: 443
  • 15. Pods nodemaster node node apiVersion: v1 kind: Pod metadata: name: my-app spec: containers: - name: my-app image: gcr.io/project/my-app - name: nginx-ssl image: gcr.io/project/nginx ports: - containerPort: 80 - containerPort: 443
  • 17. CRDs When? ● You want to create a new kind of object ● You want to package multiple objects as one What? ● Extension of the Kubernetes API ● You write the spec and build a controller Where? ● Docs: https://kubernetes.io/docs/conc epts/extend-kubernetes/api-ex tension/custom-resources/
  • 18. Example CRD apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: securedeployments.ctl.gcp.solutions spec: group: ctl.gcp.solutions version: v1 scope: Namespaced names: plural: securedeployments singular: securedeployment kind: SecureDeployment shortNames: ["sd", "securedeploy"] $ kubectl get sd $ kubectl describe securedeploy
  • 20. Operators When? ● You want to own the lifecycle of a package of objects ● You want to model and control external services What? ● A design pattern for custom resources ● Implements complex controllers for CRDs How? ● Operator-SDK: https://github.com/operator-fra mework/operator-sdk ● Kubebuilder: https://github.com/kubernetes- sigs/kubebuilder
  • 22. ● Tekton defines some Custom Resources ● Tekton runs controllers to reconcile resource status toward the desired state ● That's all Tekton is: ○ Open API (CRDs) ○ Kubernetes controllers that know how to handle them Back to Tekton!
  • 23. Tekton Architecture Task Pipeline Pipeline Resource > tkn
  • 25. Tekton Custom Resource Definition Pipeline Task git Task image Task Task cluster cluster Pipeline Resource Pipeline Resource Step Step Step Step Step Step Step Step
  • 26. ● Stateless, reusable, parameterized task definition ● Defines steps to run, parameters, inputs and outputs Tekton CRD: Task apiVersion: tekton.dev/v1alpha1 kind: Task metadata: name: go-something spec: inputs: parameters: - name: command steps: - name: go-something image: golang:stretch command: ['go', '${inputs.parameters.command}']
  • 27. Running a Task ● Create a TaskRun that references the Task ● Provide required parameters apiVersion: tekton.dev/v1alpha1 kind: TaskRun metadata: generateName: go-build- spec: taskRef: name: go-build inputs: params: - name: command value: build
  • 28. Tekton CRD: TaskRun apiVersion: tekton.dev/v1alpha1 kind: TaskRun metadata: generateName: go-version- spec: taskSpec: steps: - name: go-version image: golang:stretch command: ['go', 'version'] ● When created, starts doing work ● Defines steps to run in order ○ /workspace volume shared across steps ● Defines input source(s) to fetch and mount into /workspace
  • 29. apiVersion: tekton.dev/v1alpha1 kind: TaskRun metadata: generateName: go-version- spec: taskSpec: steps: - name: go-version image: golang:stretch command: ['go', 'version'] TaskRun Controller ● Watches for new TaskRuns ● Creates a Pod to run specified steps in order ● Watches Pod for status updates apiVersion: v1 kind: Pod metadata: name: go-version-blah-pod-blah spec: containers: … - name: go-version image: golang:stretch command: ['go', 'version'] … create updates updates updates
  • 30. apiVersion: tekton.dev/v1alpha1 kind: TaskRun metadata: name: go-version-mxylp spec: taskSpec: steps: - name: go-version image: golang:stretch command: ['go', 'version'] … status: startTime: 2019-06-14T05:43:49Z completionTime: 2019-06-14T05:53:33Z conditions: - type: Succeeded status: True podName: go-version-blah-pod-blah steps: - name: go-version terminated: exitCode: 0 startedAt: 2019-06-14T05:45:52Z finishedAt: 2019-06-14T05:46:52Z ● Populates status based on Pod status TaskRun Controller
  • 31. ● Timeout ● Resource requests and limits ○ "K8s: This needs 3.25 CPUs and 17.84 GB of RAM" -- can get more resources if available ○ "K8s: Stop it from using more than 8 CPU" ● Node and Pod affinity ○ "K8s: I can tolerate being put on a preemptible VM; I'm not that important" ○ "K8s: I require a node with 4 GPUs; I'm kind of a big deal" ○ "K8s: Try to schedule me on the same node as $otherpod, but if not nbd" ● Persistent Volume Claims ○ "K8s: attach a Persistent Disk at /cache so I can write to it" ○ "K8s: attach that same disk again at /cache so I can read from it" ○ Kubernetes schedules Pods to Nodes with necessary PDs attached ○ Incremental builds! TaskRun Features
  • 32. Tekton Resource: PipelineResource ● Defines an entity that can act as a Task input or output ● Source inputs are placed into /workspace/${resourceName} ● Can be referenced in Tasks ● Examples: ○ Git repo ○ Container image ○ Test result ○ GitHub PR ○ Kubernetes Cluster
  • 33. Using PipelineResources === taskrun.yaml === apiVersion: tekton.dev/v1alpha1 kind: TaskRun metadata: generateName: go-build- spec: taskRef: name: go-build inputs: resources: - name: source resourceSpec: type: git params: - name: url value: https://github.com/my/repo === task.yaml === apiVersion: tekton.dev/v1alpha1 kind: Task metadata: name: go-build spec: inputs: resources: - name: source type: git steps: - image: golang:stretch workingdir: /workspace/source command: ['go', 'build', './...']
  • 34. Pipeline Tekton Resources: Pipeline and PipelineRun ● Pipelines are stateless, reusable, parameterized collections of Tasks ○ PipelineRuns are running instantiations of Pipelines, obviously ● Tasks linked by input and output PipelineResources ○ Task A produces a container image, Task B takes that container image and deploys it ○ ...or with order explicitly defined (just run A then B) Task git Task image Task Task deploy deploy cluster cluster
  • 36. ● Simple to use and deploy Web UI for Tekton Pipelines ● Similar in spirit to the Kubernetes Dashboard ● Provides reusable Tekton Web UI components Tekton Dashboard
  • 37. ● Library of commonly used tasks ● Parameterized to capture many use cases ● Examples ○ Kaniko for daemon-less image building ○ Buildpacks to go from source code to Docker images without a Dockerfile Tekton Catalog
  • 39. 1.0 / Beta (Currently at alpha) Tekton Pipelines 2019 https://github.com/tektoncd/pipeline/blob/master/roadmap-2019.md
  • 40. Tekton Pipelines 2019 Q2 Q3 + Q4 A complete CI/CD solution Event triggering Log persistence SCM support Moar cool stuff
  • 41. Tekton Pipelines 2019 Q2 Requirements Design Implementation Event triggering Log uploading SCM Support { CompleteCIsolution
  • 42. Tekton Pipelines 2019 Q3 + Q4 Requirements Design Implementation Sidecar Support Conditional Execution PipelineResource Extensibility Task Extensibility Images Outputs Catalog Integration Pause + Resume Partial execution Access control Performance SLOs Config as code Notifications CRD persistence PipelineResource Factory Test “framework” Not started
  • 45. Logging in to your lab account Use an incognito window: 1. Go to https://console.cloud.google.com 2. Log in with the username and password given to you in the handout 3. In a new tab open up the following page for the lab procedure: https://github.com/viglesiasce/tekton-workshop