Application development and deployment

Examine patterns and practices of application development, configure Azure Pipelines, and implement site reliability engineering (SRE) best practices.

Plan, train, and proof

As you get started, the checklist and resources below will help you plan your application development and deployment. You should be able to answer these questions:

  • Have you prepared your development environment and setup workflow?
  • How will you structure the project folder to support Kubernetes application development?
  • Have you identified state, configuration, and storage requirements of your application?

<! docsTest:ignore "AAD Pod Identity -->

Checklist Resources
Prepare your development environment. Configure your environment with the tools you need to create containers and set up your development workflow. Working with Docker in Visual Studio Code
Working with Kubernetes in Visual Studio Code
Introduction to Azure Dev Spaces
Containerize your application. Familiarize yourself with the end-to-end Kubernetes development experience, including application scaffolding, inner-loop workflows, application-management frameworks, CI/CD pipelines, log aggregation, monitoring, and application metrics. Containerize your applications with Docker and Kubernetes (e-book)
End-to-end Kubernetes development experience on Azure (webinar)
Review common Kubernetes scenarios. Kubernetes is often thought of as a platform for delivering microservices, but it's becoming a much broader platform. Watch this video to learn about common Kubernetes scenarios such as batch analytics and workflow. Common scenarios to use Kubernetes (video)
Prepare your application for Kubernetes. Prepare your application file system layout for Kubernetes and organize for weekly or daily releases. Learn how the Kubernetes deployment process enables reliable, zero-downtime upgrades. Project design and layout for successful Kubernetes applications (webinar)
How Kubernetes deployments work (video)
Go through an AKS workshop
Manage application storage. Understand the performance needs and access methods for pods so that you can provide the appropriate storage options. You should also plan for ways to back up and test the restore process for attached storage. The basics of stateful applications in Kubernetes (video)
State and data in Docker applications
Storage options in Azure Kubernetes Service
Manage application secrets. Don't store credentials in your application code. a key vault should be used to store and retrieve keys and credentials. How Kubernetes and configuration management work (video)
Understand secrets management in Kubernetes (video)
Using Azure Key Vault with Kubernetes
Use Azure AD pod identity to authenticate and access Azure resources

Deploy to production and apply best practices

As you prepare the application for production, you should implement a minimum set of best practices. Use the checklist below at this stage. You should be able to answer these questions:

  • Can you monitor all aspects of your application?
  • Have you defined resource requirements for your application? How about scaling requirements?
  • Can you deploy new versions of the application without affecting production systems?
Checklist Resources
Configure readiness and liveness health checks. Kubernetes uses readiness and liveness checks to know when to your application is ready to receive traffic and when it needs to be restarted. Without defining such checks, Kubernetes will not be able to determine if your application is up and running. Liveness and readiness checks
Configure logging, application monitoring, and alerting. Monitoring your containers is critical, especially when you're running a production cluster, at scale, with multiple applications. The recommended logging method for containerized applications is writing to the standard output (stdout) and standard error (stderr) streams. Logging in Kubernetes
Get started with monitoring and alerting for Kubernetes (video)
Azure Monitor for containers
Enable and review Kubernetes master node logs in Azure Kubernetes Service (AKS)
View Kubernetes logs, events, and pod metrics in real time
Define resource requirements for the application. A primary way to manage the compute resources within a Kubernetes cluster is using pod requests and limits. These requests and limits tell the Kubernetes scheduler what compute resources a pod should be assigned. Define pod resource requests and limits
Configure application scaling requirements. Kubernetes supports horizontal pod autoscaling to adjust the number of pods in a deployment depending on CPU utilization or other select metrics. To use the autoscaler, all containers in your pods must have CPU requests and limits defined. Configure horizontal pod autoscaling
Deploy applications using an automated pipeline and DevOps. The full automation of all steps between code commit to production deployment allows teams to focus on building code and removes the overhead and potential human error in manual mundane steps. Deploying new code is quicker and less risky, helping teams become more agile, more productive, and more confident about their running code. Evolve your DevOps practices
Setting up a Kubernetes build pipeline (video)
Deployment Center for Azure Kubernetes Service
GitHub Actions for deploying to Azure Kubernetes Service
CI/CD to Azure Kubernetes Service with Jenkins

Optimize and scale

Now that the application is in production, how can you optimize your workflow and prepare your application and team to scale? Use the optimization and scaling checklist to prepare. You should be able to answer these questions:

  • Are cross-cutting application concerns abstracted from your application?
  • Are you able to maintain system and application reliability, while still iterating on new features and versions?
Checklist Resources
Deploy an API gateway. An API gateway serves as an entry point to microservices, decouples clients from your microservices, adds an additional layer of security, and decreases the complexity of your microservices by removing the burden of handling cross-cutting concerns. Use Azure API Management with microservices deployed in Azure Kubernetes Service
Deploy a service mesh. A service mesh provides capabilities like traffic management, resiliency, policy, security, strong identity, and observability to your workloads. Your application is decoupled from these operational capabilities and the service mesh moves them out of the application layer and down to the infrastructure layer. How service meshes work in Kubernetes (video)
Learn about service mesh
Use Istio with Azure Kubernetes Service
Use Linkerd with Azure Kubernetes Service
Use Consul with Azure Kubernetes Service
Implement site reliability engineering (SRE) practices. Site reliability engineering (SRE) is a proven approach to maintain crucial system and application reliability while iterating at the speed demanded by the marketplace. Introduction to site reliability engineering (SRE)
DevOps at Microsoft: Game streaming SRE