Kubernetes is a powerful, operational platform for containerized applications. However, the developer workflow on Kubernetes – how you code, deploy, update, and monitor your services – is much less mature.
How should you lay out your Git repo? How do you create loosely coupled services? How do you support deploying your service at any time?
In this talk, we’ll talk about these questions and more. We’ll discuss the journey towards a rapid development workflow, discuss best practices, and, talk about the process we followed to get to a rapid development workflow.
DevOps Days Boston 2017
4. 4
Take the standard development process:
Code
(Dev)
Test
(QA)
Prod
(Ops)
Release
(Release)
Define
(Product)
5. 5
… and make it distributed.
> No central release, test, dev cycle. Each person/team operates
an independent development process.
> Team needs to have the skills / knowledge to operate all
aspects of the development process.
Service A Service B Service C
6. 6
Microservices is a distributed
development process for cloud-native
software.
> Not an architecture! Your architecture supports
the process, and not the other way around.
9. 9
1. Self-sufficiency. Each team needs to be self-sufficient in all aspects of
the development cycle to avoid bottlenecks.
2. Safety. Since it’s hard to be an expert in every area of the
development, need to insure an oops isn’t catastrophic.
Givethedeveloper/devteamtheabilitytoSUCCESSFULLY
operateindependently.
11. 11
• Massive community and ecosystem
• 14M Docker hosts
• 3300+ contributors
• Lots of third party tools
• Build, package, and deploy your
service (and dependencies!) in a
consistent way
12. 12
• Massive community and ecosystem
• 789 companies, 2505 developers
• Google, Red Hat, Oracle, Microsoft
have embraced Kubernetes
• 62% of K8S are on AWS
• Mesosphere is embracing K8S on
DC/OS
• Kubernetes is the cloud POSIX …
not just a container scheduler
• Declarative definition of your cloud
infrastructure
13. 13
• Fast growing community and
ecosystem
• Lyft, Google, IBM, Verizon, Yahoo,
Datawire …
• CNCF project
• Modern L7 proxy
• Designed for distributed cloud
architectures (global rate-limiting,
observability, circuit breakers, …)
• APIs for managing fleets of Envoy
proxies
14. 14
1. Microservices is a distributed development workflow that
helps you go faster.
2. Start your microservices journey by building an efficient
workflow for your first services team, then your organization.
3. The Kubernetes ecosystem, Docker, and Envoy provide
the foundational components you need to build that
workflow.
19. 19
1 Bootstrap the service with a service template.
$ git clone $URL
todo/
Dockerfile # How do you build your code + container
k8s/ # How should Kubernetes run your service
tf/ # What non-Kubernetes resources need to be provisioned
app.py # stub for your application
service.yaml # Metadata about your service
20. Realism: How closely does
this mirror production?
Fast feedback cycle for
developers
Low setup and
maintenance cost for
developers
Scalability as your
application gets more
complex
Run entire system locally
Run business logic
locally, cloud resources
remote
Single service local, all
other services remote
All remote development
100% remote development100% local development
2 Code. Build a productive development environment.
Docker or
Minikube
Telepresence
+ Kubernetes
Kubernetes +
CI/CD
Set up local drivers
to cloud resources
21. 21
3 Deploy to development Kubernetes cluster.
A
Build a container image that contains your code,
dependencies, and configuration, based on the Dockerfile.
B Tag the image.
C Push image to a container registry.
D Update Kubernetes manifest with tag.
docker build
docker tag
docker push
E Apply Kubernetes manifest to cluster.
Start with a Kubernetes manifest
template, and instantiate the image
tag (and other variables, too) into
the template.
kubectl apply
F Repeat for all dependencies.
e.g., other services
22. 22
4 Deploy to production Kubernetes cluster.
A
Build a container image that contains your code,
dependencies, and configuration, based on the Dockerfile.
B Tag the image.
C Push image to a container registry.
D
Update Kubernetes manifest with production config data
and update Envoy configuration for canary routing.
Keep the same environment & deploy
process for dev/prod to eliminate
environmental differences.
E Apply Kubernetes manifest to cluster.
F Repeat for all dependencies, including Envoy.
Envoy deploys the same way as any
other service.
23. 23
5 Analyze metrics.
A Deploy each service behind Envoy.
B
C Add additional service-specific metrics as appropriate.
Automatically measure L7 throughput, latency, and
availability for the service via Envoy.
D Collect metrics in Prometheus or equivalent.
26. 26
1. Microservices is a distributed development workflow that
helps you go faster.
2. Start your microservices journey by building an efficient
workflow for your first services team, then your organization.
3. The Kubernetes ecosystem, Docker, and Envoy provide the
foundational components you need to build that workflow.
4. To maximize productivity, optimize the loop. Make your
workflow from source code to getting feedback as fast as
possible — which means self-sufficiency.
31. 31
1. Microservices is a distributed development workflow that
helps you go faster.
2. Start your microservices journey by building an efficient
workflow for your first services team, then your organization.
3. The Kubernetes ecosystem, Docker, and Envoy provide the
foundational components you need to build that workflow.
4. To maximize productivity, make your workflow from source
code to getting feedback as fast as possible.
5. An efficient workflow lets teams be safely self-sufficient —
letting them to move fast and not break things.
32. 32
Thanks!
Feedback/questions: richard@datawire.io
Tutorial to do this yourself: http://www.datawire.io/guide/
development/fast-develop-deploy-canary-workflow/
Open source tools for developers on K8S: https://
www.datawire.io (Telepresence, Forge, Ambassador)
We’re hiring an OSS/C++ engineer to work on Envoy!