Changes in Go implementation of the new protobuf and gRPC

If you don’t know yet, there were major changes by Google in protobuf and gRPC implementation for Go. New version should be better in all means so you should switch as soon as possible, if you are already using these technologies. In this article I am going to focus on Linux variant, but the upgrade procedure should be quite similar on OSX or Windows. In order to use protobuf compiler or generator, if you wish, you had to install protoc compiler. There are no changes in this step, you still need it although you may want to upgrade to the latest version. ...

2020-11-15 · 2 min · Boban Acimovic

Sync Kubernetes volume with S3 bucket

In the Cloud era topics like backup became kind of less important. One of the reasons is probably possibility to take automated snapshots of your volumes, another maybe that you can use some kind of redundancy. However, there are still use cases where you need more traditional ways to backup your data. In this article we will discuss about syncing files from your Kubernetes volume to S3 compatible storage. If you know the concept of Persistent Volumes in Kubernetes, then you also know three of the supported access modes: ReadWriteOnce, ReadOnlyMany or ReadWriteMany. The first mode allows a volume to be mounted just once, meaning it is usually already used by some pod and it is possible to access it just through this pod. The other two types can be mounted multiple times, meaning multiple pods can access the same data. In case of ReadOnlyMany all pods can just read the data, but in case of ReadWriteMany all pods can read and write data. In this article we are going to focus to these volumes that we can mount multiple times. ...

2020-10-06 · 3 min · Boban Acimovic

Develop Kubernetes native applications in Golang with auto-recompile and auto-restart

Do you develop or plan to develop a Kubernetes native application in Golang, controller or operator? Such application strongly depends on being inside Kubernetes and development outside of Kubernetes may be a real hassle. Usually you have to build an image over and over again and restart the pod (with imagePullPolicy set to Always). This is very boring and time consuming procedure. Two years ago I developed an image to auto-recompile and auto-restart Go application, named go-reflex , but it was intented to be used by docker-compose. Today I gave it a try with Kubernetes, namely with kind (Kubernetes in Docker) and it turned out it works like a charm. In this article I will describe how to set this up and save your time for something creative (i.e. beer drinking). ...

2020-08-28 · 2 min · Boban Acimovic

Traefik 2.2 can again fully utilize Kubernetes Ingress resources

Learn how to setup Traefik 2.2 on Kubernetes and how to automatically get TLS wildcard certificates. Traefik is a modern Web server made in the cloud era so it’s authors define it as a Cloud Native edge router. It is written in Go and it’s maybe not as fast as nginx or HAProxy, but it is fast enough and in the same time it has great features not present in traditional Web servers. These features include automatic care of TLS certificates, nice control panel, support for Docker stacks and Kubernetes, etc. ...

2020-07-31 · 3 min · Boban Acimovic

Using Traefik 2.2 middlewares with Kubernetes Ingress resources

Since Traefik 2.0, this feature was possible just with custom IngressRoute resources, but it is now possible with normal Kubernetes Ingress as well. So, what is the Traefik middleware, anyways? It is a piece of code which is triggered just before the Ingress itself. Here you can find the full list of available directives that you can use to create your middleware. In this article we are going to define two middlewares, one to redirect www.example.io to example.io, so that we make SEO happy and another one for basic authentication. Here is how this would look like using helmfile declaration: ...

2020-07-31 · 2 min · Boban Acimovic

Install cert-manager using helmfile

You may wonder what the heck is helmfile ? Well, I would say what is docker-compose to Docker, this is helmfile to Helm . Basically, it allows us to install the whole stack of applications to our Kubernetes cluster in a declarative way. And you may also wonder why is cert-manager so special? I would say cert-manager itself is not that special Helm chart, but it contains CRD ’s which may be installed either by using value installCRDs=true or by installing them using kubectl apply before you install the chart. ...

2020-07-28 · 2 min · Boban Acimovic

Add Google search engine to your Linux Mint

I had a problem recently not being able to set Google as default search engine in Firefox of my Linux Mint installation. It is not that I like Google that much, it is actually opposite, but DuckDuckGo as default search engine doesn’t give me the satisfying search so it seems it is not possible to skip Google tracking and keep your privacy, at least not at this moment. If you had such problem, this is because Google search engine doesn’t fund Linux Mint and this is why they are not on the list. In order to turn it on, check this out . ...

2020-07-26 · 1 min · Boban Acimovic

NFS provisioner for your K8S cluster

Do you need ReadWriteMany storage class and your cloud provider doesn’t offer it? According to Wikipedia , Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems (Sun) in 1984, allowing a user on a client computer to access files over a computer network much like local storage is accessed. Even though this idea is 35 years old, it is still very useful in your Kubernetes cluster, specially if you need ReadWriteMany storage class. If you are interrested about this, you are probably wondering how to achieve this? ...

2020-07-26 · 1 min · Boban Acimovic

Serving Single-Page Applications in Go

Someone may ask what is so special about serving single-page applications? Well, if you use hash (#) based URL’s like https://yourdomain.com/#/yourroute , there is no problem because browser recognize that this is a default page with some parameters and doesn’t make another request to the server. However, if you want to use non-hash based routes, there is a problem if you try to refresh a non-default route. In this case browser’s default action is to load such URL from the server and there is no such document on the server. For example, if you load your SPA at URL https://yourdomain.com and then you click on another route, you will see in your browser’s URL field something like https://yourdomain.com/yourroute . That works fine unless you try to reload the page. In that case browser doesn’t know this is actually already loaded SPA, but it actually tries to fetch /yourroute URI from server. As there is no such URI on the server, you will usually get the famous 404 error and your application breaks. ...

2020-05-03 · 3 min · Boban Acimovic

Svelte await blocks

Few weeks ago I came across Svelte, a radical new approach to building user interfaces (quote from Svelte homepage ). Svelte is actually a compiler, not tradional framework like React, Angular or Vue, but it can do pretty much everything as the mentioned ones. It doesn’t use virtual DOM, but instead it compiles to vanilla JavaScript and access the DOM directly. As a consequence, Svelte generated JavaScript is very small comparing to competition, but also quite fast. ...

2020-01-15 · 2 min · Boban Acimovic