Using kubectl patch in continuous deployment

How to deploy new Docker images to your Kubernetes cluster? Of course, there are many ways and one of the most common ways is to use kubectl set image, for example: 1 kubectl set image deployment/nginx-deployment nginx=nginx:1.17.5-alpine However, what happens if you have more containers in your deployment pod spec? And what if you also have initContainers? Fortunately, kubectl patch can help. Let’s assume we have two containers and one init container....

2019-10-23 · 2 min · Boban Acimovic

Generators, wait groups and closures in Golang

This is the first step of my intention to write a series of articles where I would explain some common patterns used in Golang. Let’s start with generator pattern : 1type Generator func() <-chan int Generator is a function or method which returns a sequence of values. In Golang, this usually means returning a channel of values of desired type. In our example, we will return a channel of integers. Let’s see an implementation of this:...

2019-10-04 · 5 min · Boban Acimovic

Add flag to Linux Mint application start command

Modern Linux desktop distributions contain really powerful settings possibilities, but it is very often difficult to find out how to configure something. You may want, for example, to add –disk-cache-dir flag to Chromium start command in order to configure cache directory, so how to do it? right click on the menu start button and select “Configure” click on the “Menu” button at the top of the “Menu” window click on the “Open the menu editor” button browse the applications and find the requested one (Chromium in this case) select the application and click on “Properties” button on the right add requested command flag in the “Command” field The described procedure relates to Linux Mint 19....

2019-10-03 · 1 min · Boban Acimovic

Install Golang package on Ubuntu Linux

Official Golang documentation contains just tar.gz package to be downloaded and installed on Ubuntu Linux, but this is not quite comfortable way because Golang won’t be automatically updated after new release. Fortunatelly, there is trustable PPA that can be used. 1 2 3 sudo add-apt-repository ppa:longsleep/golang-backports sudo apt-get update sudo apt-get install golang-go

2019-10-03 · 1 min · Boban Acimovic

New kind on the Block

Few months ago I wrote an article about replacing Minikube with MicroK8s , but now we have even better soluion, kind . Like dind allows running Docker inside Docker containers, kind allows running Kubernetes inside Docker containers. kind basically abstracts nodes as Docker containers and then runs Kubernetes inside. After you install Golang , it is quite easy to install and setup kind: 1 2 GO111MODULE="on" go get sigs.k8s.io/kind@v0.5.1 kind create cluster After some 30 seconds your single node cluster will be ready for development and testing....

2019-10-03 · 1 min · Boban Acimovic