About this blog

We are experts in deploying code to production in the cloud. We are responsible for doing this hundreds of thousands of times - through automation. Learn some of these best practices here …

CDK Template to Launch an EC2 Instance with an Encrypted Root Volume

Using CDK, EC2, an Encrypted Root Volume, VPC, and the VS Code Remote SSH plugin

A teammate recently drew my attention to the benefits of Remote Development using SSH, a plugin for VS Code. It provides a local experience for developing remotely. I’ve done remote development with terminals and SSH and my favorite editor for a long time. However, the combination of a full IDE experienece along with the decent terminal experience available in VS Code motivated me to give it a try. In this article, we’ll create a remote development environment with AWS CDK. [Read More]
aws  cdk  ec2  vpc  vscode 

Kubernetes Controller Pattern Example with Java and MySQL

A controller written in Java that creates MySQL databases in a Kubernetes cluster

This post is a continuation of Kubernetes with Java - Handling Events which showed us how to subscribe to API events for a given type of Kubernetes resource and deal with them in near real-time. In this post, we will learn how to use that capability along side other client machinery components to write a Kubernetes controller. What are we trying to do For this post, our goal is to make it easier to create multiple MySQL database instances in a Kubernetes cluster. [Read More]

10x Faster Spring Boot Startup Times

Spring Native Startup Performance

Applications based on spring-boot are not known for extremely fast startup times and low memory usage. Usually spring-boot application are meant for long running backend processes and we have learned to live with the startup time and higher memory usage. This is because leveraging spring-boot solves so many other problems for the developer and speeds up the overall development process. In other words, we are OK with more developer productivity at the cost of higher resource usage at runtime specially at application startup. [Read More]

k9s - My Favorite Kubernetes Tool

Kubernetes CLI To Manage Your Clusters In Style

If you work with Kubernetes clusters a lot, you are most probably used to typing a lot of kubectl commands. A while ago, I discovered k9s and it made working with Kubernetes clusters so much simpler. To quote the description directly from the k9s site: K9s is a terminal based UI to interact with your Kubernetes clusters Installing k9s is written in go-lang. The beauty of programs written in that language is that they are compiled down to a single binary with all the dependencies included. [Read More]

Kubernetes with Java - Handling Events

Handling Kubernetes API events in Java

This post is a continuation of Kubernetes with Java - Asynchronous APIs which showed us how to interact with the Kubernetes API to list deployment resources on demand. In this post, we will learn how to handle Kubernetes API events in near real-time. An example use case for this capability might be to send a notification to a slack channel whenever an app deployment is started or when it finishes and becomes ready to be consumed. [Read More]

Config Updates Without Redeployment for Spring and Kubernetes

Spring PropertySources and Kubernetes Configmaps

Here’s what you’ll accomplish by the end of this article: Create a small Spring Boot application that loads a property file from a configurable location overriding configuration that is packaged with the application. Package the application in a docker image and see how to override the config file via docker commands. Deploy the application to kubernetes. Use a Kubernetes Configmap to update your configuration without redeployment of your application. Learn about when using these methods together is recommended. [Read More]

Accelerate Your Deployment Velocity with Feature flags

Moving Beyond Environment Segmentation

Make Small Iterative Changes We wrote in How Many Deployments Amazon Does in a Day that your team is likely capable of deploying a million times in about 10 years with a little more than 55 engineers by making 2-3 changes per week per engineer to production. When you make that many changes per week, those changes likely aren’t complete features. Complete features may have hundreds of small iterative changes of that size with contributions from many people. [Read More]

Kubernetes with Java - Creating Images

Bundling your Java apps into OCI images to run under Kubernetes

Building production quality images for Java apps To run a spring-boot app on k8s, you need to create a container image. The images need to be in the Open Container Image format. In this article, we will review how to create OCI images two different ways: Using a Dockerfile Using Cloud Native Buildpacks Note: The Open Container Image (OCI) format antecedent of the Docker image format as a standard specification. [Read More]

You Can Match How Many Deployments Amazon Does in a Day

(Per Engineer)

Wonder how many deployments Amazon does in a day? In November 2014, Dr. Werner Vogels reported that Amazon achieves 50M deployments a year across their dev, test, and production environments. That’s 136k deployments per day or about 1.6 per second. His article describes the systems they created to automate deployment across their infrastructure. That is only one aspect of reaching that astronomical position. You also need a lot of engineers to reach that level of productivity. [Read More]

Kubernetes with Java - Running in the Cluster

Using Kubernetes API through a Java app from inside the Kubernetes cluster with RBAC

What are we going to do? This post builds on top of Kubernetes with Java - Introduction and Kubernetes with Java - Asynchronous APIs posts which showed us how to interact with the Kubernetes API to list deployment resources and provide an API of our own to list teams and apps belonging to those teams running in the cluster. In this post, we will Configure a spring-boot app to be able to access the Kubernetes API when running inside a Kubernetes cluster Learn how to package up a spring-boot app into an OCI image (aka Docker image) Configure RBAC with Role, RoleBinding, and ServiceAccount so our spring-boot app has the ability to run with only the Kubernetes APIs that we think it should have access to and nothing more Create Deployment and Service resources to deploy our spring-boot app and expose its API within the cluster Prerequisites Access to source code for the project - https://github. [Read More]