Play with OpenShift Internal Docker Registry and imagestreams

Configure your shell to use docker daemon of Minishift eval $(minishift docker-env) export user token registry URL export TOKEN=$(oc whoami -t) export REGISTRY_URL=$(minishift openshift registry) Logging in to Registry docker login -u developer -p $TOKEN $REGISTRY_URL OR we can use directly as, docker login -u developer -p $(oc whoam -t) $(minishift openshift registry) Now you can tag images, push it to respective project to create imagestream docker tag mynodejs $(minishift openshift registry)/myproject/nodejs Push the docker image to registry so that it will create imagestream automatically, docker push $(minishift openshift registry)/myproject/nodejs Now you can create application using the new imagestream, oc new-app --image-stream=nodejs --name app

August 13, 2018 Â· 1 min Â· Suraj Narwade

FOSSASIA Summit 2018-Event Report

Day1 I reached venue (LifeLong Learning Institute, Singapore) at around 10.30 am and volunteers were all set to welcome us with smile and welcome kit :) Venue was awesome with multiple conf rooms and good facilities. Harish Pillay(Red Hat) & Damini Satya (SalesForce) Kicked off the event with Awesome Keynote with introducing FOSSASIA, stats about FOSSASIA and schedule as well. Followed by Keynote, Teo Ser Luck (Member of Parliament, Singapore) expressed his thoughts about OpenSource and how it is helping Singapore Governance and Economy....

March 31, 2018 Â· 4 min Â· Suraj Narwade

Mounting host folders in minishift

Make sure sshd service is running on your host. $ sudo systemctl status sshd ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled) Active: active (running) since Wed 2017-12-13 18:23:09 IST; 4min 14s ago Docs: man:sshd(8) man:sshd_config(5) Main PID: 11319 (sshd) Tasks: 1 (limit: 4915) Memory: 4.9M CPU: 333ms CGroup: /system.slice/sshd.service └─11319 /usr/sbin/sshd -D Dec 13 18:23:09 localhost.localdomain systemd[1]: Starting OpenSSH server daemon... Dec 13 18:23:09 localhost....

December 13, 2017 Â· 1 min Â· Suraj Narwade

Mounting host folders in minikube

supports PV of type hostpath. minikube is configured to persist files stored under following directories. /data /var/lib/localkube /var/lib/docker /tmp/hostpath_pv /tmp/hostpath-provisioner any other directory will not persist the data after reboot. To mount host directory inside minikube, $ minikube mount /host-mount-path:/vm-mount-path for example, $ minikube mount ~/mount-dir:/mountexample Mounting /home/user/mount-dir/ into /mountexample on the minikubeVM This daemon process needs to stay alive for the mount to still be accessible... ufs starting This process has to stay open, so open another terminal (if you want more than one mountpath, open one more terminal follow the above procedure)...

December 9, 2017 Â· 1 min Â· Suraj Narwade

How to split commits in git

I am very bad at git and I always forget the steps. It’s always better to write it somewhere. Then why not a blog ? To split your last or recent commit, simply do, $ git reset HEAD~ But I wanted to break 3rd commit and split it into two commits, then I did as following way, $ git rebase -i HEAD~3 if you dont know the number you can also mention SHA1 of that commit as well,...

November 27, 2017 Â· 1 min Â· Suraj Narwade

Easter eggs in kubectl

I was watching video about kubectl by janakiram and surprising I found there is also world of commands rather than create, delete, get. kubectl has lots of interesting easter eggs. Some of the cool things I found as below, List pod along with node name on which they are running kubectl get pods -o wide If you want yaml or json configurations of your application(maybe pod,deployment or service,etc) kubectl get pod web -o=yaml/json CLI hacks to retrieve minimal information (In this case, pod name and node name) kubectl get pod -o wide | awk {'print $1" " $7'} | column -t you can directly edit configurations kubectl edit pod/web You can mention editor of your choice using KUBE_EDITOR variable, KUBE_EDITOR="sublime" kubectl edit pod/web If we want to get any specific thing from configurations kubectl get pods web -o jsonpath={....

September 26, 2017 Â· 2 min Â· Suraj Narwade

Running static pod using standalone kubelet on fedora

Static Pods are managed by kubelet on specific minion. As they are not associated with any controller, APIServer has no control over it. One of the use case for static pod might be for storage like gluster on each minion or maybe for os level debugging on OS like atomic host. For testing it, I referred kelseyhightower’s standalone kubelet guide. To install kubelet, we can either download kubelet binary and set it up manually or we can get it from kubernetes-node package,...

September 23, 2017 Â· 2 min Â· Suraj Narwade