Hands-on Tutorials

Decoupling the configuration lifecycle from the application lifecycle by making use of git-sync, Kubernetes init-containers, ConfigMaps and volumes

Image for post
Image for post
Decoupling the configuration lifecycle from the application lifecycle. (Image by Author)

Every application needs to be configured and we need the flexibility to adapt this configuration without recreating the application artifact or image. This constitutes a pattern for a Continuous Delivery approach.

Problem

How would we adapt an application in a containerized world to the different setups of development, staging, sandbox and production environments? The answer is to use external configuration data, which is different for each environment.

Often, it is better to keep all the configuration data in a single place and not scattered around in various resource definition files. …


Using Google Cloud Scheduler, Cloud Functions, Pub/Sub, Cloud Storage, and Cloud IAM

Image for post
Image for post
Photo by Kenrick Mills on Unsplash

Many — if not most — businesses store an off-site backup of critical client information that can really save them if something goes wrong. Simply backing up data and having an effective backup and disaster recovery plan in place can help mitigate various types of threats.

Cloud providers like Amazon or Google offer automated backup features for AWS RDS and Cloud SQL, respectively.

Let’s suppose we have the requirement to ensure up to 35 days of backups for Google Cloud SQL instances. …


A useful example and step by step guide that can be used when K8s pod autoscaling based on Custom Metrics is needed.

I decided to write these steps because I was recently involved in migrating a complex application from AWS to GCP and as with other systems of this kind we cannot meet their SLAs by relying on CPU or memory usage metrics only.

Autoscaling is an approach to automatically scale up or down workloads based on the resource usage. The K8s Horizontal Pod Autoscaler:

  • is implemented as a control loop that periodically queries the Resource Metrics API for core metrics, through metrics.k8s.io API, like CPU/memory and the Custom Metrics API for application-specific metrics (external.metrics.k8s.io or custom.metrics.k8s.io API. They are provided by “adapter” API servers offered by metrics solution vendors. …


The API Gateway pattern implements a service that’s the entry point into the microservices based application, from external API clients or consumers.

It is responsible for request routing, API composition, and other edge functions such as authentication.

When working with a microservices architecture, either on a greenfield project or during migration from monolith, a best practice is to start addressing cross-cutting concerns. Authentication is such a concern and in this article we’ll cover the Authentication of a multi-tenancy application.

There are numerous technologies we can use to implement an API gateway pattern, including off-the-shelf API Gateway products like Kong.

Image for post
Image for post

When it receives a request, the Kong API Gateway searches within a routing map that specifies which upstream service to route the request to. This function is identical to the reverse proxy feature provided by web servers such as NGINX. Kong is based on the NGINX HTTP server, and let us configure flexible routing rules that use the HTTP method, headers and path to select the backend/upstream service and it also provides a bundle of plugins that implement edge functions such as authentication: acl and key auth. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store