This document discusses developing microservices directly in Azure Kubernetes Service (AKS). It begins with introductions and an overview of Biqmind. It then discusses challenges developers face with microservices and various approaches to setting up a development environment, including running services in Kubernetes namespaces, using okteto for hot syncing to remote containers, and giving each developer their own namespace. It covers related tools like Dev Pods and Visual Studio Code Remote - Containers. Q&A and resources are also provided.
2. • 10 years+ of experience helping customers
across US/APAC unlock the value of cloud
• Ex Red Hat Senior Solutions Architect,
Emerging Technologies practice
• Kubernetes Specialist
• Cloud Native Compute Foundation(CNCF)
ambassador
HELLO
“Chak” Jonagam
Biqmind Head Software Architect
@debianmaster
Confidential – do not distribute
biqmind
3. ABOUT BIQMIND
Confidential – do not distribute
Specialist services and software tools to make cloud-native possible
CLOUD-NATIVE TOOLS
CAPE radically simplifies advanced
Kubernetes functionalities and development
across clouds/on-premise
Disaster Recovery, Multi-cluster deployment,
CI/CD, ingress/DNS
SPECIALIST SERVICES
Specialist resources to bridge gaps
around process, product, and technologies.
Azure and Red Hat Partner
Architecture, Development,
DevSecOps, Project Management
DISCOVERY WORKSHOPS
Focused programs that deliver
practical goals, use cases and action plans
in 1 to 3 days
Technology or
industry specific
biqmind
4. Confidential – do not distribute
TODAY
The problem
• Our story
• Our developer expectations
The solution
• Possible approaches
• Pros and cons with each approach
• Tool universe
• Demo
biqmind
5. OUR DEVELOPER JOURNEY
Clone all
24 repos
Use CAGE to run all 24
services with host path
mount into container for hot
reload
Sync CAGE specific
changes to K8s/AKS
deployment configsAdopting K8s In
lower envs
Sync changes to edge
deployment specific configs
Create CAGE specific
Deployment config
Confidential – do not distribute
biqmind
11. Debugging is harder with microservices
and that complexity doubles with containers
Confidential – do not distribute
biqmind
12. Things work differently
in different environments
like docker and AKS,
It is not easy to sync
configs if you use
different tools for dev
and non-dev
Confidential – do not distribute
Credits: Photo by Pop & Zebra on Unsplash
biqmind
13. Confidential – do not distribute
What does a
Great Dev environment
look like?
Confidential – do not distribute
biqmind
14. Confidential – do not distribute
A GREAT DEV ENVIRONMENT…
Smooth set Up
& onboarding
Production-Like
environment
Easy on
laptop
biqmind
15. Confidential – do not distribute
A GREAT DEV ENVIRONMENT…
Easy to debug
across services, logs
Easy to
replicate
Faster
feedback
Easy branch
switching
biqmind
17. • Run all services in K8s namespace
• Deploy code-server in same K8s cluster
(preferably in same namespace)
• Open browser to access code editor
• Clone repos, start services
• Can embed vscode-web inside desktop app
Confidential – do not distribute
VSCODE WEB ALONGSIDE SERVICES
• Not a native editor experience
• Few additional steps are required
to create services, dependencies,
scale down conflicting services etc
payment-svc
recommendations-svcorder-svc
fulfillment-svc
payment-svc
biqmind
18. • Run all dependent services on shared K8s cluster
• Run services that you are working on, on your laptop
• Connect dependency services from laptop to shared
cluster transparently, no extra config required
• Establish private network between shared namespace
and services on laptop using kube-fwd
• Scale down the services that you are working on, on
the shared cluster to avoid conflicts
Confidential – do not distribute
HYBRID SHARED NAMESPACE
• npm link works
• Scaling down services that you are working on is
manual
• Dependencies on laptop need to be configured
payment-svc order-svc
payment-svc
recommendations-svcorder-svc
fulfillment-svc
recommendations.default.svc
Scale down
services that
you work on
to zero on
shared
cluster
trafficbiqmind
19. • Run all dependent services on shared K8s cluster
• Use okteto to transparently convert services that
you want to work on into dev mode
• No private network between laptop and k8s cluster
is needed as all the services are running on the
same cluster
• All changes in the local environment are synced to
remote container
Confidential – do not distribute
HOT SYNC TO REMOTE CONTAINER
• Not great for sync if the cluster is too
far from dev machine
• npm link does not work
paymentsvc order-svc
payment-svc
recommendations-svcorder-svc
fulfillment-svc
Redeploy target
services in dev
mode to
enable live sync
code syncbiqmind
20. • Each developer works on her own namespace (self-service)
• Access to platform services
HOT SYNC TO REMOTE CONTAINER
namespace
api
frontend
db
namespace
api
frontend
dbauth
Developer 1 Developer 2
Confidential – do not distribute
biqmind
21. Confidential – do not distribute
TOOL
UNIVERSE
Dev Pods
Dev Spaces Visual Studio Code Remote
- Containers
biqmind
22. It seems like many dev tools and plugins need to be configured. Is
it more effort than local development?
In this presentation, I demonstrated the various different approaches we took to save time for other
people. You can pick the right one based on your business case.
Can Gitlab plug into AKS? i do not see any challenge with it if you are using gitlab runners, but I m not an expert in that area
Our environment does not allow use of cloud services. Could we
use on-premise kubernetes with hot sync to remote container
instead of using AKS?
Azure does have solutions for on-prem Kubernetes. However, you can use the tools against any
standard k8s distribution.
Can i know if it is hard to setup the environment, to do a testing on
my personal laptop?
In this presentation, I demonstrated the various different approaches we took to save time for other
people. You can pick the right one based on your business case.
In my perception, we can create more then one container or more
then one program in a container. Is it possible for us to create
backend process such as ajax, and activate web sockets to
communicate between program in different container?
Containers inside a pod can use `localhost` to use call each other, so yes, it is possible to
communicate (make sure you use the right port for service)
Doesn't it cost more for every developer have his or her own
namespace? If we have 25 developers, we must have 25
namespace on AKS.
While there is cost associated, it also gives flexibility for developers and speeds up the development
process.
Confidential – do not distribute
Q&A
biqmind
23. Is it possible if we create many services and some of them can be
reused in containers for different projects? Or should we copy the
services to a new project if we need them again?
Some services can act as shared services (deployed in shared namespace) which do not change
often so it is quite possible. But keep in mind the additional bootstrapping time required. To answer
you fully, I probably need a better understanding of your context.
How gitlab work with AKS ? Can we setup gitlab runner inside
AKS?
From my experience, helm chart was a better way to integrate with AKS. This document may help,
see https://docs.gitlab.com/runner/install/kubernetes.html
Kubefwd is similar to port forward command in kubectl. Any
difference to that?
kubefwd also creates /etc/hosts entries for services and removes when you stop automatically, so
slightly more advanced than kubectl port-forward. For more details, see
https://github.com/txn2/kubefwd
In hindsight, would you use other alternatives to microservices
other than kubernetes?
While the focus of this session has been providing different options for enterprises to save time on
evaluation, we still think kubernetes is the best fit for microservices development. From my
experience, other paths will take more time
Is Okteto only available for Golang and nodeJs? No, it is available for most languages
What is the tool used for consolidating logs for all services in one
place?
The tool is tilt, you can find more information on it here https://github.com/windmilleng/tilt
if i deploy Istio in a private cluster, how do I access the dashboard
like grafana on my local machine?
You can try using kubectl port-forward on your grafana dashboard pod
Is the code base of the sample application available Github to
download?
Any sample application would work. The one I used is here https://github.com/debianmaster/nodejs-
welcome
Confidential – do not distribute
Q&A
biqmind
24. If your organization is looking to build cloud-native applications or implement Azure
Kubernetes Service quickly, we can help!
Our FREE consulting session covers:
• Readiness questionnaire and interview
• Discovery into common pain points such as integration with existing infrastructure,
security and deployment complexity
• Discussion on how you can implement a pilot project on AKS
For more details:
bit.ly/AKSApp
Confidential – do not distribute
FREE HALF-DAY AKS APP
ASSESSMENT
biqmind
25. • Biqmind AKS Services:
https://biqmind.com/azure/aks/
Confidential – do not distribute
OTHER RESOURCES
biqmind
26. THANK YOU
For more information:
Gianluca Carola
Senior Director, Partnership & Alliances
Gianluca.Carola@biqmind.com
Vinod Narayanankutty
Enablement Director
Vinod.Nara@biqmind.com
Confidential – do not distribute
biqmind