Image for post
Image for post

A quick google search for how to deploy Kubernetes workloads to a Kubernetes cluster will likely point you to various GitOps solutions such as FluxCD or ArgoCD. GitOps is an excellent practice to follow that, in my opinion, essentially means using git to perform your operations tasks. FluxCD and ArgoCD are simply tools that facilitate the implementation of the GitOps workflow. There is a great post here that demonstrates how a GitOps workflow can be implemented with Terraform. Whether or not FluxCD, ArgoCD, or Terraform is the right tool for the job ultimately depends on your requirements. One reason to choose Terraform over the others is that you can define both a k8s workload and the cloud resources that the workload depends on in one place (i.e. you may have a k8s workload that depends on an AWS SQS Queue). For the sake of this article, we will ignore why you would choose one tool over the other and simply describe one way of how to use Terraform. …

Image for post
Image for post

So you started down the path of using Kubernetes and everything has been a dream! You were able to deploy workloads with immense speed and efficiency and you were able to integrate your various services with each other with ease. Then you realized that requests were failing every time you deployed an update to one of your workloads during the deploy window. Zero downtime deploys can be achieved in Kubernetes. There is still hope for the stability of your workloads!

We will start off by defining a simple proto file containing the API which will be exposed by our sample application via…

Image for post
Image for post

Terraform is a very powerful tool that can be used to create infrastructure as code. It makes it very easy to build consistently repeatable infrastructure. Terraform has a huge API that allows for easy defining of almost anything that you can imagine that would exist in AWS, GCP, Azure, and various other providers.

The flexibility of Terraform is an excellent strength of the tool, until it comes time to code review. Not because it is difficult to view the code and understand, but because certain teams/people should not be defining particular resources. …

Image for post
Image for post

When I first started looking into how to use Spinnaker I immersed myself in their documentation and in various videos available on YouTube. There are quite a few good resources available to help in getting started with Spinnaker, and more documentation is always being added.

From my understanding, it seemed like the best way to install spinnaker is using halyard to create a distributed installation on a Kubernetes cluster. Halyard provides a CLI to configure how Spinnaker will be deployed and to deploy updates to an existing cluster. Halyard basically provides an easy-to-use interface to generate halconfig. The nice thing about halconfig is that you can back it up easily since it is just a file(s). …

Writing distributed services in Go is made easier through the use of go-kit. If you haven’t already used go-kit, I definitely recommend checking it out. You can learn most of the basics by working through this example. For this post, you basically need to understand that go-kit offers the ability to break up the construction of services into 3 main layers: transport, endpoint, and service. These layers provide the ability to easily wrap implementations using the middleware or decorator pattern.

Logging is very important. It can be critical in diagnosing problems, tracking functionality, etc. With go-kit services every request follows the flow: transport layer (grpc, http, etc) -> endpoint layer -> service layer. At the service layer each method has a unique signature so creating a middleware to wrap a service layer requires implementing each method of the service interface within the middleware. At the endpoint layer all endpoints use the consistent endpoint type. This means that creating a middleware to wrap endpoints can be done with just one function. So logging of every request can be accomplished by creating a single function. …

I have run into a road block in my AWS EKS cluster due to the Amazon VPC CNI. The blocking issues for me are that the CNI limits the number of pods that can be scheduled on each k8s node according to the number of IP Addresses available to each EC2 instance type so that each pod can be allocated an IP. The other problem with the Amazon VPC CNI is that it is eating up the number of IP Addresses available within my VPC (note: this can be overcome by using an alternate subnet).

Due to these pain points, I decided to start looking into alternate CNIs. I don’t want to sacrifice too much performance when choosing an alternate CNI and I want the installation process to be easy. There is a wonderful article on performance between the various popular Kubernetes CNIs here. Unfortunately, this comparison doesn’t offer any numbers on the Amazon VPC CNI. I decided to conduct my own simple benchmark to compare the Amazon VPC CNI vs Calico and Weave. Note that my comparisons are very simple and are intended to get a basic understanding of how the VPC CNI stacks up against the better comparisons already given on the before-mentioned benchmark article. …

After many hours of struggling with getting my go application to build within the building of my docker image, I decided this information could be useful to others. The problem I experienced, and likely why you are reading this, is that in order to fetch go dependencies from a private repository you need to setup git credentials within the docker image build.

Here are some errors that I was seeing through my struggles:

go: unknown revision v1.0.0
go: error loading module requirements
: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/72c960bac0ed57f7476f8d5540fea5f31c278ae0591ac68bee5481c69cc5a5ef: exit status 128:
fatal: could not read Username for '': …

Lately I have been playing with go-kit to try to understand how I can use it to build microservices. There are a variety of examples available here, but unfortunately, not all of them are well documented.

I specifically wanted to figure out how to use the Api Gateway example, so I did. Here is how I got it working….

You will need to have a working Go environment setup to follow along. You can get that going by starting here.

Getting the source code

Download the go-kit examples by go get’ing the repo somewhere on your local system:

$ go get

Starting Addsvc

Cd into the addsvc example directory (this is assuming your $GOHOME is set to $HOME/go), then fetch the…

Jeff Wenzbauer

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