How to run your DevOps using Kubernetes
Published in
6 min readNov 9, 2018
This post is part of a series: Introduction to Microservices for .NET Developers
In previous posts of this series we explained the life-cycle of DevOps for containers. And we talked about:
- How to BUILD your application with Docker.
- How to SHIP it to a container registry.
- In this post we will talk about the RUN part, and how to deploy and manage in Kubernetes.
Best Practices
Consider the following best practices during your implementation:
- Use Kubernetes namespaces for different projects/environments. For example: projectname-dev, projectname-test, projectname-staging. This allows the required separation between pods/services inside each namespace, allowing to create the same service name in multiple environments. Also allowing to delete a complete environment by deleting its namespace.
- Use same docker image for deploying in multiple environments and use Kubernetes ConfigMaps (will explain shortly below) to change the configuration files (database connections or urls).
- Name external resources like what you named Kubernetes namespaces. For example: database names, urls routes like http://projectname-dev.k8s.com or file system folders for content, environment names in…