Quick PV for local Kubernetes cluster

A hostPath based local PV creation process for using via PVC

Suraj Deshmukh

1 minute read

I do lot of Kubernetes related work either on minikube or local OpenShift cluster setup in a VM. Often I need to create a PersistentVolumeClaim a.k.a. pvc. But to use pvc you have to have a PersistentVolume or pv defined. Enter into the machine running k8s If using minikube you can do minikube ssh Create a local directory for storage mkdir /tmp/pv0001 chmod 777 /tmp/pv0001 If you are on a machine that has SELinux enabled do the following

Suraj Deshmukh

2 minute read

Like many Saturday mornings, Red Hat Bangalore office was once again abuzz with enthusiasm on 8th of April, for hosting yet another successful chapter of Bangalore Kubernetes Meetup. The Meetup had a good turnaround of about 40 people who gave up on their early morning saturday sleep to attend it despite the sweltering hot season and in line were four awesome talks. Suraj Deshmukh set the stage with his opening talk, Kubernetes on CRI-O, wherein he explained different jargons like OCI, CRI, etc.

k8s on CRI-O - single node

How to make kubernetes use CRI-O as container runtime

Suraj Deshmukh

2 minute read

Here is a single node Kubernetes on CRI-O. This setup is done on Fedora 25. Installing OS dependencies dnf -y install \ go \ git \ btrfs-progs-devel \ device-mapper-devel \ glib2-devel \ glibc-devel \ glibc-static \ gpgme-devel \ libassuan-devel \ libgpg-error-devel \ libseccomp-devel \ libselinux-devel \ pkgconfig \ wget \ etcd \ iptables Creating go environment cd ~ mkdir -p ~/go export GOPATH=~/go export GOBIN=$GOPATH/bin export PATH=$PATH:$GOBIN echo ‘GOPATH=~/go’ >> ~/.

TODOs for new project

Things to do to make a project successful

Suraj Deshmukh

1 minute read

When starting a new open source project, apart from coding following are the things that need to be done. Docs README LICENSE How to install? How to use? Code of conduct guidelines Copyright Issue template like .github in repo. Developer docs How to install for developer? Developer docs Contribution guidelines Team meetings info Team communication channels Issue label guidelines Coding standards Code placement doc, or something that explains the way code is ordered Design document Development Makefile Unit tests Functional tests Coverage check CI for automatic tests Distro based package This is just few things that I could think of, please suggest if you know more in comments.

rpm Notes

General notes about rpm packaging and references to upstream docs

Suraj Deshmukh

2 minute read

Setup of the system for building rpms $ dnf -y install fedora-packager fedora-review $ sudo usermod -a -G mock vagrant $ fedora-packager-setup $ kinit surajd@FEDORAPROJECT.ORG My Notes Start reading from: Fedora packager’s guide Some macros come from redhat-rpm-config and fedora-rpm-macros. $ sudo rpm -ql redhat-rpm-config-45-1.fc25.noarch To see all macros on the system: $ rpm –showrc Koji - fedora build system fedora uses fedpkg for doing builds, while rpmbuild is for CentOS To get general info about the package $ rpm -qip .

Git Notes

Contains notes about using git

Suraj Deshmukh

8 minute read

Notes about using git. Tips and tricks Switch branches $ git checkout <branch> status $ git status -sb Show status in short format and also give branch info show $ git show Shows log message and diff about the commit you are on. log $ git log -L 70,100:pkg/transformer/kubernetes/kubernetes.go Get logs on file between line numbers. $ git log –graph –abbrev-commit Show graph in logs.

Intellij Shortcuts

Shortcuts of intellij and also some short notes

Suraj Deshmukh

5 minute read

Note: This is a living document and will be updated as I discover new things. Shortcuts Ctrl + Shift + A Find any action in IDE Ctrl + Shift + F Find in Path Alt + 1 Open project navigator. You can search here, just start typing here, after the project navigator window is opened. Shift + Insert in Project window Here you can add new file to the project.

Suraj Deshmukh

4 minute read

Note: This is a living document and will be updated from time to time. Following are steps to package kompose for CentOS PAAS SIG. CentOS PAAS SIG is a repository of packages where rpms related to OpenShift and eco-system around it are delivered. Setup your machine Install packages needed sudo yum update -y && \ sudo yum install -y epel-release && \ sudo yum install -y rpm-build go redhat-rpm-config make koji \ gcc byobu rpmlint rpmdevtools centos-packager Setup certs

Suraj Deshmukh

2 minute read

I generally do kompose package testing for fedora and CentOS. So here are the steps I follow. Fedora For respective fedora version use the tag respectively for e.g. 25 for fedora 25. Starting the environment: docker run -it registry.fedoraproject.org/fedora:26 bash Running tests:

Inside the container # Pull packages from the testing repository dnf –enablerepo updates-testing -y install kompose # Check the kompose version kompose version # Install the testing dependencies dnf install -y jq make # Pull the git repository to run the functional tests git clone https://github.