Enabling local development with Kubernetes

I want to show how you can enable Kubernetes in your day to day development workflow. So that you get the feel of production deployment locally from day 1. I have a flask application which I am working on. The basic directory structure looks like this: $ ll total 24 -rw-rw-r--. 1 foo foo 427 Apr 23 16:23 app.py -rw-rw-r--. 1 foo foo 201 Apr 23 16:55 docker-compose.yml -rw-rw-r--. 1 foo foo 363 Apr 23 16:21 Dockerfile -rwxrwxr-x....

April 23, 2017 路 5 min 路 Suraj Deshmukh

Quick PV for local Kubernetes cluster

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...

April 18, 2017 路 1 min 路 Suraj Deshmukh

Bangalore Kubernetes Meetup April 2017

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....

April 8, 2017 路 2 min 路 Suraj Deshmukh

k8s on CRI-O - single node

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' >> ~/....

April 8, 2017 路 2 min 路 Suraj Deshmukh

TODOs for new project

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....

March 26, 2017 路 1 min 路 Suraj Deshmukh

rpm Notes

This post will get you through all the steps needed for doing RPM packaging. 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鈥檚 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 ....

March 24, 2017 路 2 min 路 Suraj Deshmukh

Git Notes

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. commit $ git add -p Commit only parts of file....

March 21, 2017 路 8 min 路 Suraj Deshmukh