Read the database connection string and other secrets from environment variables

It is not good practice to store secrets in the source code repository. The sample C# dotnet core application code stores the database connection string in the appsettings.json file which eventually will be pushed into GitHub. To follow the Twelve-Factor App methodology, store the configuration values in environment variables and load them runtime. This method […]

Mount NFS volume from macOS

When we try to mount an NFS with from macOS we get the error message: docker: Error response from daemon: error while mounting volume ‘/var/lib/docker/volumes/…/_data’: failed to mount local volume: mount :/data:/var/lib/docker/volumes/…/_data, data: addr=…,vers=4: operation not permitted. or docker: Error response from daemon: error while mounting volume ‘/var/lib/docker/volumes/…/_data’: failed to mount local volume: mount :/data:/var/lib/docker/volumes/…/_data, […]

ERROR: column “…” does not exist

PostgreSQL converts all column and table names to lowercase in the SQL query. If the column or table name contains uppercase letters, we need to use double quotes to be able to reference them. When we get the error message ERROR: column “username” does not exist select * from public.”AspNetUsers” where UserName = ‘… ^ […]

PostgreSQL management tools

Install postgresql The postgresql package contains the PostgreSQL utilities: psql, pg_dump On macOS Install pgAdmin pgAdmin is a browser based database management tool for PosgtreSQL databases. Download Download the installer from https://www.pgadmin.org/download/ Install On macOS Double click the downloaded file Accept the license agreement Drag the application into the Applications folder Start pgAdmin On macOS […]

How to remove all Docker containers and images from the host

Docker images are stored on the host to launch as fast as possible. The drawback is, Docker can fill the hard drive with unused images. A recent possible bug in Docker caused the accumulation of unused, unreferenced images on the host. To delete all Docker containers and images, use these commands in the terminal Get […]

Error: Error creating LB Listener: ValidationError: ‘arn:aws:elasticloadbalancing:….b’ must be in ARN format

We create a new AWS Application Load Balancer and get this error message when the second listener is created Error: Error creating LB Listener: ValidationError: ‘arn:aws:elasticloadbalancing:….’ must be in ARN format make sure the region and AWS profile are correctly set for the new listener config.

Learn Kubernetes part 3 – Traefik Ingress Controller

In the previous post, Learn Kubernetes part 2 – NGINX Ingress Controller, we have deployed a web application and exposed it via the kubernetes/ingress-nginx ingress controller. In this exercise we will use Traefik, another popular proxy server. Traefik is widely used for multiple reasons: it is easier to configure, can automatically generate and renew SSL […]

Learn Kubernetes part 2 – NGINX Ingress Controller

Large organizations need to control the incoming traffic to the Kubernetes cluster. The most secure way is to use an ingress controller and create an ingress to channel all incoming traffic to the cluster. In Learn Kubernetes part 1 – Web application in a Kubernetes cluster we have created a simple web application pod and […]