Posts

  • Implement GitOps on Kubernetes with ArgoCD and Kustomize

    GitOps is a term first coined and popularized at Weaveworks. GitOps can in it’s most concise form be described as a philospohy or a workflow on how infrastructure and application code changes/deployments should be applied to a desired state where Git is the single source of truth. GitOps is not limited to Kubernetes but in the Kubernetes ecosystem we have specialized tools that can easily helps us implement GitOps due to the already declarative nature of Kubernetes manifests.

    In this guide we will build a complete GitOps workflow on Kubernetes using ArgoCD as the GitOps engine and orchestrated from Github Actions as the CI part.

    argocd

    Read more...
  • Build an external api with auth using Traefik and Go

    In this post I will show how to easily build an external api with authentication with help from Traefik. The usecase is the following: you want to make an external api only authenticated users can access. In this solution the authentication will be a token which clients will supply as an HTTP header. We will leverage Traefik to make the auth server and underlying api services loosely coupled.

    Our flow will look like this: all request to out api service will firstly be forwarded to an auth server, if the auth server responds with 200, access is granted and the clients original request will be performed. Otherwise the request from the auth server will be performed which will be an 401. We will configure Traefik to handle this routing for us. Take a look at the picture below for the flow of the request:

    fork join

    Read more...
  • Build a serverless website from scratch using S3, API Gateway, AWS Lambda, Go and Terraform

    In this guide we will leverage AWS to build a completely serverless website (frontend and backend api) using S3, API Gateway and Lambda. We will use Terraform to set up our AWS resources and we’ll use Go as our programming language for the lambda function. For the frontend we will write a static html and javascript/jquery file (stored in S3) that will communicate with our lambda function.

    The goal of this guide is to show how to leverage infrastructure-as-code, i.e. no clicking and fiddling around in the AWS console!

    weather-website

    Read more...
  • Traefik tutorial - dynamic routing for microservices

    Traefik is an awesome reverse proxy (and load balancer) with lots of backend supports. So why do we need another reverse proxy? (we already have nginx and haproxy that are stable and performant). Don’t get me wrong, nginx and haproxy are awesome, but the problem with them is how to manage configuration. In a microservice world configuration are not stable, services come and go and configuration need to be updated to route traffic something that haproxy and nginx are not designed for. Enter traefik.

    Read more...
  • Concurrency in Go - Fundamentals

    In this post we will delve into the fundamentals of Go’s concurrency features, the target audience are readers familiar with the language; however no prior knowledge of concurrency is required.

    Read more...
  • Using websockets in golang with gorilla-websocket

    This will be a tutorial in how to implement websockets in Go using the excellent gorilla/websocket package. We will build a backend server in Go that accept json from the user and pushes that data on the websocket channel; the frontend will be a simple html file with inline javascript (for simplicity sake) that connects to the go backend and listens on data and updates the html in realtime.

    Read more...

subscribe via RSS