SlideShare uma empresa Scribd logo
1 de 36
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?

Mais conteúdo relacionado

Mais procurados

Intro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networkingIntro to Project Calico: a pure layer 3 approach to scale-out networking
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Packet
 

Mais procurados (20)

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

Semelhante a [20200720]cloud native develoment - Nelson Lin

Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Michael Hofmann
 
Docker Birthday #3 Slides - Overview
Docker Birthday #3 Slides - OverviewDocker Birthday #3 Slides - Overview
Docker Birthday #3 Slides - Overview
Chris Ciborowski
 

Semelhante a [20200720]cloud native develoment - Nelson Lin (20)

CI/CD Development in Kubernetes - Skaffold
CI/CD Development in Kubernetes -  SkaffoldCI/CD Development in Kubernetes -  Skaffold
CI/CD Development in Kubernetes - Skaffold
 
Introduction of CCE and DevCloud
Introduction of CCE and DevCloudIntroduction of CCE and DevCloud
Introduction of CCE and DevCloud
 
DWX 2023 - Datenbank-Schema Deployment im Kubernetes Release
DWX 2023 - Datenbank-Schema Deployment im Kubernetes ReleaseDWX 2023 - Datenbank-Schema Deployment im Kubernetes Release
DWX 2023 - Datenbank-Schema Deployment im Kubernetes Release
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/Kubernetes
 
CI/CD Development in Kubernetes - Skaffold
CI/CD Development in Kubernetes -  SkaffoldCI/CD Development in Kubernetes -  Skaffold
CI/CD Development in Kubernetes - Skaffold
 
My kubernetes toolkit
My kubernetes toolkitMy kubernetes toolkit
My kubernetes toolkit
 
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
 
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
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
Experts Live Europe 2017 - Why you should care about Docker - an introductionExperts Live Europe 2017 - Why you should care about Docker - an introduction
Experts Live Europe 2017 - Why you should care about Docker - an introduction
 
Running Spring Boot in Kubernetes and Intro to Helm
Running Spring Boot in Kubernetes and Intro to HelmRunning Spring Boot in Kubernetes and Intro to Helm
Running Spring Boot in Kubernetes and Intro to Helm
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegExploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
 
GCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native ArchitecturesGCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native Architectures
 
Docker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker SlidesDocker Birthday #3 - Intro to Docker Slides
Docker Birthday #3 - Intro to Docker Slides
 
Docker Birthday #3 Slides - Overview
Docker Birthday #3 Slides - OverviewDocker Birthday #3 Slides - Overview
Docker Birthday #3 Slides - Overview
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
Docker Birthday #5 Meetup Cluj - Presentation
Docker Birthday #5 Meetup Cluj - PresentationDocker Birthday #5 Meetup Cluj - Presentation
Docker Birthday #5 Meetup Cluj - Presentation
 
20170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 201720170321 docker with Visual Studio 2017
20170321 docker with Visual Studio 2017
 
Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)Environment management in a continuous delivery world (3)
Environment management in a continuous delivery world (3)
 

Último

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Último (20)

Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 

[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?

Notas do Editor

  1. Repetitive tasks of building, pushing and deploying images Difficult to set up debugging against a k8s