BASH

Kubernetes how create folders for Physical Volumes (PVs) automatically

Kubernetes how create folders for Physical Volumes (PVs) automatically

Adding commands before an entrypoint.

Nathan Obert
Introduction This will be a quick short blog entry. Today I needed to have a container that could self-initialize it’s own Physical Volumes. This is quite easy to do with an init container. I’m going to provide a simple example to show how this works with busybox. Deployment YAML initContainers: - name: init-pv image: {{ .Values.initpv.image }} volumeMounts: - name: init mountPath: {{ .Values.persistentVolume.path }} {{- with .Values.initpv.command }} command: {{- toYaml .
Changing the colors in BASH

Changing the colors in BASH

Quick way to change colors in bash

Nathan Obert
Changing colors in BASH So I find some color combations very hard to read. If you have a black background, the dark blue directory color is hard to read. If you have a white background the bright green executable color is hard to read. For whatever reason it was not thought very well through to have well contrasting colors for everything. I found this Ask Ubunutu on how to change the directory colors and decided to write a blog post to make sure I never lost the steps again.
Map Windows share to Linux

Map Windows share to Linux

Quick way to copy files from Windows to Linux

Nathan Obert
Mounting Windows on Linux Setup on Ubuntu sudo apt-get install keyutils sudo apt-get install cifs-utils Setup on Redhat sudo yum install keyutils cifs-utils Syntax UNC=server.domain.com/share USERNAME=yourwindowslogin DOMAIN=NAMEOFDOMAIN PASSWORD=yourpassword sudo mkdir -p /mnt/${UNC} sudo mount -t cifs -o username=${USERNAME},domain=${DOMAIN},password=${PASSWORD} //${UNC} /mnt/${UNC}
Kubernetes init container to verify dependent service(s) are online.

Kubernetes init container to verify dependent service(s) are online.

Init container to check if kubernetes service available

Nathan Obert
Introduction With HELM Scripts containers all try to start at the same time. It depends on how the containers scripts were designed on if there is any sort of delay or dependency cchecking built into them. I wrote a very simple busybox script that can be used to prevent a container from starting until the kubernetes services is needs are available. In this example there are 3 checks going on.