Starting with Golang 1.16, file embedding is supported in Go without the need of an external package. I have been using packages like pkgr and packr to make it easier to embed static files in go binaries. We’ll explore the usage of the new //go:embed directive in this post.

Why do we need static file embedding?

There would be cases when we’d want to embed static files in the binary. While it is possible to build a binary that reads static files off the disk, it is often cumbersome to ship it to end users as the static files have to be located at a certain place on user’s device or the location has to be configurable. …

Grafana Labs recently launched the v2 of their log aggregation solution — Loki. Loki makes some interesting choices around log aggregation to support horizontal scaling and to keep the operational costs low. It is inspired by Prometheus. Loki supports querying the logs for errors, patterns and much more.

In this post, we’ll go over the setup for Loki on Kubernetes. Before we setup Loki, we’ll install some microservices that we can use to generate logs and events and then consume those via Loki. …

JupyterHub is an open-source tool that offers the ability to spin up Jupyter notebook servers on demand. The notebooks can be used for data analysis or to create and execute Machine learning models. Istio is a service mesh that offers secure and observable communication mechanism between different services in a Kubernetes cluster.
One of the benefits of running JupyterHub in an istio-enabled cluster is to gain support for mTLS(mutual TLS) capabilities between different JupyterHub components. mTLS ensures that all communication between the hub and the user-notebook servers is encrypted and is safe from eavesdropping. …

If you are developing using Rust on Windows with a WSL2, adding support for debugging is very easy. If you haven’t started using WSL2(Windows subsystem for Linux 2) yet, you can follow my previous post on how to Install and setup Rust development environment on WSL2.

Install Debug Tools

We’ll write a new application to go through the setup steps. You can also clone the application from Github if you don’t want to set it up locally.

cargo init rustapp
cd rustapp
code .

For a linux backend(WSL2 in this case), install the CodeLLDB extension on Visual Studio Code.

Image for post
Image for post
Install the CodeLLDB extension

Configure the debugger

Once the extension is installed, setup a debug configuration by clicking Run -> Add Configuration from the VSCode menu. Add the following launch.json configuration. You would need to change the program path when setting up the debug config for a different project. …

DevOps engineers and Kubernetes admins often need to deploy their applications and services to multiple environments. Depending on the setup, an environment could mean a Kubernetes cluster or a namespace in the same cluster or a combination of namespaces spread across clusters. There could be multiple motivations to deploy to different environments. Isolating test environment from production and multi-region(including multi-cloud) deployments are some common examples of multiple environment setup.

The Kubernetes ecosystem has many tools that help developers to deploy an application. If you go through the Kubernetes documentation, you’ll see examples and snippets of YAML files that can be used to create or update Kubernetes objects. Deployments, services, config-maps and secrets are among the most commonly used Kubernetes objects. Managing YAML files can become increasingly complex as the application grows. Jsonnet has emerged as an elegant way of managing this complexity. …

Rust aka rust-lang is gaining a lot of adoption in the community for building reliable and efficient software. The more I have used it, the more I like it. I use Mac or Linux for development mostly. I recently got a new Windows system after 5 years of using a MacOS. Windows has come a long way over the years since I was away. I followed the development in the space but never tried any of the new features until recently. One the major reasons that I wanted to try the windows machine is the new WSL2 (Windows Subsystem for Linux 2) that allows users to run a Linux VM inside windows and integrates nicely with many applications and gives a near native Linux experience. …


Harsimran Singh Maan

Person. Jack of some trades.

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