SlideShare a Scribd company logo
Cloud Native Development
Cloud code for example
20.07.2020 Nelson
Agenda
Cloud-native & kubernetes
Why do we develop on kubernetes?
Difficulty and solution
Cloud code and related components
About
Nelson Lin
Cloud Technical Account Manager
in Red Hat. Help accounts adopt Red
Hat cloud technologies well and help
them succeed.
Software engineer, building a cloud
management system, experienced of
frontend and backend programming
having experience in CI/CD pipeline,
interested in big data, distributed
computing, and cloud-native
technologies.
Cloud Native & Kuberenetes
Cloud-native definition
● An approach exploits the advantages of the cloud
computing delivery model to building and running
applications
● How applications are created and deployed,
● Cloud native is all about changing the way you think
about constructing critical business systems.
● Cloud-native systems are designed to embrace rapid
change, large scale, and resilience.
https://tanzu.vmware.com/cloud-native
https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/definition
https://zh.data-driven.blog/2019/11/01/%E4%BB%80%E9%BA%BC%E6%98%AF-cloud-native%EF%BC%9F-%E7%82%BA%E4%BB%80%E9%BA%BC-cloud-native-
%E9%80%99%E9%BA%BC%E7%86%B1%E9%96%80%EF%BC%9F/
Cloud-native foundational pillars
While several container orchestrators
exist, Kubernetes has become the
de facto standard for the cloud-native
world. It's a portable, extensible, open-
source platform for managing
containerized workloads.
Why Do We Develop On Kubernetes
DevOps deployment pipeline
https://www.quartech.com/technologies/devops/
Let’s go dive deeper
Let’s go dive deeper
Development phase takes over 65%of your SDLC
Containerization/Cloud-nativeVirtualization(XaaS)
From convention to virtualization and cloud-native
Single-box
Difficulty And Solution
Developing k8s/cloud-native app. is frustrating
Too much
configuration
Debugging is a
pain
Applications have
so many moving
parts
Spend too much
time outside of the
codes
Infinite loop of pain &
suffering
Even “Hello, World” is complicated!
Error prone
People solve that with bash scripts,
makefiles and ansible
1
4
2
53
6
Change
code
Run docker
build
Run docker
push
Patch yaml
Run kubectl
apply
Verify
7
debugging
Challenge
Config Chaos
Slow & Error-prone
Repetitive tasks
Hard to debug
Logging way
Here Comes Cloud Code
Cloud Code
Set of development tools
Cloud Code
IDE Skaffold JIB
Cloud Code
● support for the full
development cycle of
Kubernetes applications
● create a cluster for
development
● test running your finished
application
● Build & deploy
● Tag & Test & cleanup
● File sync
● Log tailing
● Port forwarding
https://cloud.google.com/code/docs/vscode/quickstart
https://cloud.google.com/code/docs/intellij/quickstart-IDEA
Out-of-the-box configuration snippets, tailored debugging experience
Making developing with Kubernetes a whole lot easier
Jib is a set of plugins for maven and gradle for
building optimized OCI-compliant container
images for Java applications without a
Docker daemon.
JIB
● Fast
○ separates applications into multiple
layers
○ splitting dependencies from classes
● Daemon-less
○ No need of docker CLI or
counterparts
○ No dockerfile
● Reproducible
https://github.com/GoogleContainerTools/jib/issues/101
https://github.com/GoogleContainerTools/jib
The flow difference
Docker build flow
JIB build flow
JIB makes build images and transfer them efficiently
200MB 2MB
Enhanced by 10,000%
Skaffold
Skaffold as a Kubernetes-native framework for developer workflows, portable to
any IDE or CI system. It provides a very easy way to test local changes to your
app on a Kubernetes cluster. And it supports multiple image builders (local
Docker, GCB & Kaniko).
Build
● Dockerfile
● Bazel
● Jib
● buildpack
That’s Skaffold
Adapts to your tooling local +
remote clusters
Test
● container-
structure-
test
Tag
● Git
● Sha256
● Env Template
● DateTime
Deploy
● Kubectl
● Helm
● kustomize
Architecture with pluggability
Skaffold debugger
● Built artifacts determine the underlying runtime technologies
● Artifacts transformed on-the-fly runtime’s debugger functionality
● Supported Language
○ Go
○ NodeJS
○ Java & JVM Language
○ Python
● Runtime specific images
○ .net Core
https://skaffold.dev/docs/workflows/debug/
Skaffold pipeline stages
Skaffold Pipeline stages Description
Init generate a starting point for Skaffold configuration
Build build images with different builders
Tag tag images based on different policies
Test test images with structure tests
Deploy deploy with kubectl, kustomize or helm
File Sync sync changed files directly to containers
Log Tailing tail logs from workloads
Port Forwarding forward ports from services and arbitrary resources to
localhost
Cleanup cleanup manifests and images
https://skaffold.dev/docs/references/yaml/
After developing, GitOps plays the next stage.
Cloud Code for IDE plugins
Step 1
Getting Started
Step 2
Local Development
Step 3
Deploy to remote
cluster
Step 4
Troubleshooting
Debugging & logs
Private image
registry
https://kubernetes.io/docs/tasks/configure-pod-container/pull-
image-private-registry/
Then
#kubectl create secret docker-registry 
--docker-server=<uri> 
--docker-username=<id> 
--docker-password=<password> 
<name>
pod/dc/deployment/ defines spec.
spec.imagePullSecrets.name = <prior to name>
Workflow of cloud code
ui(nodejs)
title(java)
game(go)
Laptop Remote Cluster
ui:v1
title:v1
game:v1
watch & sync
watch & mvn jibBuild
watch & docker build
port-forwarding
http://localhost:8080
Let’s Demo
Demo introduction
nodejs-backend
nodejs-frontend
nodejs-backend
nodejs-frontend
monogo
svc/mongo
svc/frontend
svc/backend
backend
frontend
monogo
svc/mongo
svc/frontend
svc/backend
backend
frontend
secret/quay
secret/quay
docker-desktop
OCP
Port-forward & log
Port-forward & log
deploy
deploy
push
push
RemoteLocal
intellij
vscode
Show my screen
Problem
No enough resources
No managed services
Changing IDE is arduous
Have to learn new skills
Support few tools
How integrate with you existing
circumstances/pipelines.
Take away
Let your code deployed on
kubernetes as early as possible if
you want to run on K8S
Cloud code is just a tool, but follow
the concept and try to develop as
cloud-native way ( odo, crc, ocp
and acm)
Try to reduce the gap between
deployment engineer and software
engineer
With advent of k8s, go learn a new
skill - k8s
Thank you and question?

More Related Content

PPTX
High performace network of Cloud Native Taiwan User Group
PDF
Kubernetes on the Edge / 在邊緣的K8S
PPTX
Service mesh from linkerd to conduit (cloud native taiwan meetup)
PPTX
Introduction to CNI (Container Network Interface)
PPTX
KubeCon EU 2016: Multi-Tenant Kubernetes
PPTX
How to Achieve Canary Deployment on Kubernetes
PDF
Raspberry pi x kubernetes x tensorflow
PDF
How to deal second interface service discovery and load balancer in kubernetes
High performace network of Cloud Native Taiwan User Group
Kubernetes on the Edge / 在邊緣的K8S
Service mesh from linkerd to conduit (cloud native taiwan meetup)
Introduction to CNI (Container Network Interface)
KubeCon EU 2016: Multi-Tenant Kubernetes
How to Achieve Canary Deployment on Kubernetes
Raspberry pi x kubernetes x tensorflow
How to deal second interface service discovery and load balancer in kubernetes

What's hot (20)

PDF
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
PDF
How to Prepare for CKA Exam
PDF
Load Balancing 101
PDF
Introduction of eBPF - 時下最夯的Linux Technology
PDF
Cloud Native User Group: Prometheus Day 2
PDF
Automatically Renew Certificated In Your Kubernetes Cluster
PDF
K8s storage-glusterfs-20180210
PPTX
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
PDF
KubeCon EU 2016: Heroku to Kubernetes
PDF
Docker for Java Developers - Fabiane Nardon and Arun gupta
PDF
Docker Orchestration at Production Scale
PDF
KubeCon US 2021 - Recap - DCMeetup
PDF
Network plugins for kubernetes
PDF
Overview of kubernetes network functions
PDF
Testing kubernetes and_open_shift_at_scale_20170209
PPTX
Intro to Project Calico: a pure layer 3 approach to scale-out networking
PDF
Introduction to CircleCI
PDF
Head First to Container&Kubernetes
PPTX
Tce automation-d4
PDF
Kernel load-balancing for Docker containers using IPVS
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
How to Prepare for CKA Exam
Load Balancing 101
Introduction of eBPF - 時下最夯的Linux Technology
Cloud Native User Group: Prometheus Day 2
Automatically Renew Certificated In Your Kubernetes Cluster
K8s storage-glusterfs-20180210
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
KubeCon EU 2016: Heroku to Kubernetes
Docker for Java Developers - Fabiane Nardon and Arun gupta
Docker Orchestration at Production Scale
KubeCon US 2021 - Recap - DCMeetup
Network plugins for kubernetes
Overview of kubernetes network functions
Testing kubernetes and_open_shift_at_scale_20170209
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Introduction to CircleCI
Head First to Container&Kubernetes
Tce automation-d4
Kernel load-balancing for Docker containers using IPVS
Ad

Similar to [20200720]cloud native develoment - Nelson Lin (20)

PPTX
CI/CD Development in Kubernetes - Skaffold
PDF
Introduction of CCE and DevCloud
PDF
DWX 2023 - Datenbank-Schema Deployment im Kubernetes Release
PDF
Developing Microservices Directly in AKS/Kubernetes
PPTX
CI/CD Development in Kubernetes - Skaffold
PDF
My kubernetes toolkit
PPTX
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
PDF
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
PDF
Experts Live Europe 2017 - Why you should care about Docker - an introduction
PPTX
Running Spring Boot in Kubernetes and Intro to Helm
PPTX
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
PDF
GCP Meetup #3 - Approaches to Cloud Native Architectures
PPTX
Docker 101 describing basic docker usage
PDF
Docker Birthday #3 Slides - Overview
PDF
Docker Birthday #3 - Intro to Docker Slides
PDF
Red Hat Forum Benelux 2015
PDF
HOW TO DRONE.IO IN CI/CD WORLD
PDF
The path to a serverless-native era with Kubernetes
PDF
Docker Birthday #5 Meetup Cluj - Presentation
PPTX
20170321 docker with Visual Studio 2017
CI/CD Development in Kubernetes - Skaffold
Introduction of CCE and DevCloud
DWX 2023 - Datenbank-Schema Deployment im Kubernetes Release
Developing Microservices Directly in AKS/Kubernetes
CI/CD Development in Kubernetes - Skaffold
My kubernetes toolkit
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Experts Live Europe 2017 - Why you should care about Docker - an introduction
Running Spring Boot in Kubernetes and Intro to Helm
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
GCP Meetup #3 - Approaches to Cloud Native Architectures
Docker 101 describing basic docker usage
Docker Birthday #3 Slides - Overview
Docker Birthday #3 - Intro to Docker Slides
Red Hat Forum Benelux 2015
HOW TO DRONE.IO IN CI/CD WORLD
The path to a serverless-native era with Kubernetes
Docker Birthday #5 Meetup Cluj - Presentation
20170321 docker with Visual Studio 2017
Ad

Recently uploaded (20)

PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
OOP with Java - Java Introduction (Basics)
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
PPT on Performance Review to get promotions
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Digital Logic Computer Design lecture notes
PPTX
Construction Project Organization Group 2.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
additive manufacturing of ss316l using mig welding
DOCX
573137875-Attendance-Management-System-original
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
bas. eng. economics group 4 presentation 1.pptx
OOP with Java - Java Introduction (Basics)
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Embodied AI: Ushering in the Next Era of Intelligent Systems
Operating System & Kernel Study Guide-1 - converted.pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Model Code of Practice - Construction Work - 21102022 .pdf
PPT on Performance Review to get promotions
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Digital Logic Computer Design lecture notes
Construction Project Organization Group 2.pptx
Geodesy 1.pptx...............................................
Strings in CPP - Strings in C++ are sequences of characters used to store and...
additive manufacturing of ss316l using mig welding
573137875-Attendance-Management-System-original
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Foundation to blockchain - A guide to Blockchain Tech
Lesson 3_Tessellation.pptx finite Mathematics
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx

[20200720]cloud native develoment - Nelson Lin

  • 1. Cloud Native Development Cloud code for example 20.07.2020 Nelson
  • 2. Agenda Cloud-native & kubernetes Why do we develop on kubernetes? Difficulty and solution Cloud code and related components
  • 3. About Nelson Lin Cloud Technical Account Manager in Red Hat. Help accounts adopt Red Hat cloud technologies well and help them succeed. Software engineer, building a cloud management system, experienced of frontend and backend programming having experience in CI/CD pipeline, interested in big data, distributed computing, and cloud-native technologies.
  • 4. Cloud Native & Kuberenetes
  • 5. Cloud-native definition ● An approach exploits the advantages of the cloud computing delivery model to building and running applications ● How applications are created and deployed, ● Cloud native is all about changing the way you think about constructing critical business systems. ● Cloud-native systems are designed to embrace rapid change, large scale, and resilience. https://tanzu.vmware.com/cloud-native https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/definition https://zh.data-driven.blog/2019/11/01/%E4%BB%80%E9%BA%BC%E6%98%AF-cloud-native%EF%BC%9F-%E7%82%BA%E4%BB%80%E9%BA%BC-cloud-native- %E9%80%99%E9%BA%BC%E7%86%B1%E9%96%80%EF%BC%9F/
  • 6. Cloud-native foundational pillars While several container orchestrators exist, Kubernetes has become the de facto standard for the cloud-native world. It's a portable, extensible, open- source platform for managing containerized workloads.
  • 7. Why Do We Develop On Kubernetes
  • 10. Let’s go dive deeper Development phase takes over 65%of your SDLC
  • 11. Containerization/Cloud-nativeVirtualization(XaaS) From convention to virtualization and cloud-native Single-box
  • 13. Developing k8s/cloud-native app. is frustrating Too much configuration Debugging is a pain Applications have so many moving parts Spend too much time outside of the codes
  • 14. Infinite loop of pain & suffering Even “Hello, World” is complicated! Error prone People solve that with bash scripts, makefiles and ansible 1 4 2 53 6 Change code Run docker build Run docker push Patch yaml Run kubectl apply Verify 7 debugging
  • 15. Challenge Config Chaos Slow & Error-prone Repetitive tasks Hard to debug Logging way
  • 17. Cloud Code Set of development tools
  • 18. Cloud Code IDE Skaffold JIB Cloud Code ● support for the full development cycle of Kubernetes applications ● create a cluster for development ● test running your finished application ● Build & deploy ● Tag & Test & cleanup ● File sync ● Log tailing ● Port forwarding https://cloud.google.com/code/docs/vscode/quickstart https://cloud.google.com/code/docs/intellij/quickstart-IDEA Out-of-the-box configuration snippets, tailored debugging experience Making developing with Kubernetes a whole lot easier
  • 19. Jib is a set of plugins for maven and gradle for building optimized OCI-compliant container images for Java applications without a Docker daemon. JIB ● Fast ○ separates applications into multiple layers ○ splitting dependencies from classes ● Daemon-less ○ No need of docker CLI or counterparts ○ No dockerfile ● Reproducible https://github.com/GoogleContainerTools/jib/issues/101 https://github.com/GoogleContainerTools/jib
  • 20. The flow difference Docker build flow JIB build flow
  • 21. JIB makes build images and transfer them efficiently 200MB 2MB Enhanced by 10,000%
  • 22. Skaffold Skaffold as a Kubernetes-native framework for developer workflows, portable to any IDE or CI system. It provides a very easy way to test local changes to your app on a Kubernetes cluster. And it supports multiple image builders (local Docker, GCB & Kaniko).
  • 23. Build ● Dockerfile ● Bazel ● Jib ● buildpack That’s Skaffold Adapts to your tooling local + remote clusters Test ● container- structure- test Tag ● Git ● Sha256 ● Env Template ● DateTime Deploy ● Kubectl ● Helm ● kustomize
  • 25. Skaffold debugger ● Built artifacts determine the underlying runtime technologies ● Artifacts transformed on-the-fly runtime’s debugger functionality ● Supported Language ○ Go ○ NodeJS ○ Java & JVM Language ○ Python ● Runtime specific images ○ .net Core https://skaffold.dev/docs/workflows/debug/
  • 26. Skaffold pipeline stages Skaffold Pipeline stages Description Init generate a starting point for Skaffold configuration Build build images with different builders Tag tag images based on different policies Test test images with structure tests Deploy deploy with kubectl, kustomize or helm File Sync sync changed files directly to containers Log Tailing tail logs from workloads Port Forwarding forward ports from services and arbitrary resources to localhost Cleanup cleanup manifests and images https://skaffold.dev/docs/references/yaml/
  • 27. After developing, GitOps plays the next stage.
  • 28. Cloud Code for IDE plugins Step 1 Getting Started Step 2 Local Development Step 3 Deploy to remote cluster Step 4 Troubleshooting Debugging & logs
  • 29. Private image registry https://kubernetes.io/docs/tasks/configure-pod-container/pull- image-private-registry/ Then #kubectl create secret docker-registry --docker-server=<uri> --docker-username=<id> --docker-password=<password> <name> pod/dc/deployment/ defines spec. spec.imagePullSecrets.name = <prior to name>
  • 30. Workflow of cloud code ui(nodejs) title(java) game(go) Laptop Remote Cluster ui:v1 title:v1 game:v1 watch & sync watch & mvn jibBuild watch & docker build port-forwarding http://localhost:8080
  • 34. Problem No enough resources No managed services Changing IDE is arduous Have to learn new skills Support few tools How integrate with you existing circumstances/pipelines.
  • 35. Take away Let your code deployed on kubernetes as early as possible if you want to run on K8S Cloud code is just a tool, but follow the concept and try to develop as cloud-native way ( odo, crc, ocp and acm) Try to reduce the gap between deployment engineer and software engineer With advent of k8s, go learn a new skill - k8s
  • 36. Thank you and question?

Editor's Notes

  • #16: Repetitive tasks of building, pushing and deploying images Difficult to set up debugging against a k8s