Single node Kubernetes Cluster on Fedora with SELinux enabled

Start a single node fedora machine, using whatever method but I have used this Vagrantfile to do it: # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.define "fedora" do |fedora| fedora.vm.box = "fedora/28-cloud-base" config.vm.hostname = "fedora" end config.vm.provider "virtualbox" do |virtualbox, override| virtualbox.memory = 4096 virtualbox.cpus = 4 end config.vm.provision "shell", privileged: false, inline: <<-SHELL echo '127.0.0.1 localhost' | cat - /etc/hosts > temp && sudo mv temp /etc/hosts SHELL end Now start it and ssh into it:...

September 11, 2018 路 2 min 路 Suraj Deshmukh

HostPath volumes and it's problems

This post will demonstrate how Kubernetes HostPath volumes can help you get access to the Kubernetes nodes. Atleast you can play with the filesystem of the node on which you pod is scheduled on. You can get access to other containers running on the host, certificates of the kubelet, etc. I have a 3-master and 3-node cluster and setup using this script, running in a Vagrant environment. All the nodes are in ready state:...

September 10, 2018 路 8 min 路 Suraj Deshmukh

Access etcd in OpenShift origin

How do you access the etcd that is being used by the OpenShift started by oc cluster up or using minishift. If you are using minishift then get docker environment access of the minishift VM by running following commands. eval $(minishift docker-env) && eval $(minishift oc-env) Exec into the container named origin that runs OpenShift and all the needed services. $ docker exec -it origin bash First install the etcdctl needed to talk to etcd....

July 11, 2018 路 1 min 路 Suraj Deshmukh

Change namespaces in Kubernetes

There is no easy way to change namespace in Kubernetes using kubectl command line utility. But here are some commands that you can alias in your bashrc file so that it鈥檚 just a single command that you can use to change the namespace in the Kubernetes cluster. Change namespace Let鈥檚 see step by step what goes in to change the namespace. So the first step is to find the context....

July 2, 2018 路 3 min 路 Suraj Deshmukh

Prometheus with existing application on OpenShift

This post is very specific to OpenShift and how you can have an application exposing prometheus metrics to be scraped by a prometheus running in the same cluster. Requirements Setting up cluster I have done it using the oc cluster up, read about how to do this here. You could also setup a local OpenShift cluster by running minishift, read about setting up minishift here. Downloading Kedge The configurations defined for setting up this cluster is written in a format that is understood by a tool called Kedge....

April 4, 2018 路 2 min 路 Suraj Deshmukh

Using private container registries from minikube

I am doing Kubernetes native development using minikube. And for doing that I had to download a Container image that is available in internally hosted private container registry. On the configuration side of doing that you will need to create Kubernetes Secret of type docker-registry. And now refer that secret you just created in your Pod manifest under pod.spec.imagePullSecrets. For more info follow the tutorial in Kubernetes docs on Pull an Image from a Private Registry....

October 6, 2017 路 2 min 路 Suraj Deshmukh

Static Pods using Kubelet on Fedora

I wanted to try out Standalone Kubelet Tutorial of Kelsey Hightower by myself but I could not follow it as it is, because it was firstly on GCE and secondly it uses CoreOS, but since I am very familiar to Fedora I thought of following that tutorial on it. To get a quick setup of a fresh Fedora machine use Vagrant. I have used Vagrantfile available here. This blog is only replacement of section Install the Standalone Kubelet in tutorial....

September 23, 2017 路 2 min 路 Suraj Deshmukh