Close

Rolling back to an earlier Git commit

Find the git commit you want to rollback to: git log -n20 git checkout <commit hash> Then do: git reset –hard <commit hash> git push -—force Note this can inconvenience some users because they can end up with conflicts since you did a a forced push. So another approach after checking your commit, is to […]

Read More

Services – Nodeport

In Kubernetes, ‘services’ is actually all about networking. In Docker world, when you use docker-compose, all the networking is done for you automatically behind the scenes. However that’s not the case when it comes to kubernetes. To setup networking in Kubernetes, you need to create ‘service’ objects. A single pod exists inside a single node. […]

Read More

Networking Basics

In Docker world, when you use docker-compose, all the networking is done for you automatically behind the scenes. However with Kubernetes, you will need to set up a lot of the networking yourself, by creating service and ingress. Kubernetes does come with some basic networking features out-of-the-box: A pod’s internal networking IP based pod-to-pod networking […]

Read More

pod commands

The primary function of a docker container is to run an executable (e.g. a binary, command, or shell script) along with some optional arguments. The executable+arguments are both specified in the Dockerfile with the following settings: ENTRYPOINT CMD – There’s three ways to use this setting – the 2nd approach, which is to use CMD […]

Read More

namespaces

When you create a brand new kube cluster, and then get a list of pods, you’ll get: $ kubectl get pods No resources found. This is not strictly true. In Kubernetes we have a feature called namespaces that lets us segment/organise all our objects into a construct known as namespaces. Here’s the current list of […]

Read More

Imperative vs Declaritive approaches

There’s generally two ways to use kubectl when managing your kubernetes objects (pods, services,…etc), they are the Declaritive and Imperative approaches. The Declaritive approach is about using the kubectl apply command when creating objects. That’s the approach we took in our hello-world demo. The declarative approach therefore depends on us first creating the yaml files […]

Read More

YAML files

In our hello-world demo we created a pod and service object by feeding yaml files into kubectl. Yaml is just a markup language like xml or json. The Yaml syntax is used for writing data in a structured way. I recommend taking look at the Ansible website’s yaml guide if you want to learn about […]

Read More

Using Docker with Minikube

The kubecluster running inside the minikube vm actually uses Docker to run all the containers. So when you create kubernetes objects, e.g. pods, then you can use the docker cli to view the underlying containers that have been created. You might want to do this for troubleshooting/debugging purposes. In our macbooks, the docker cli is […]

Read More

Hello World – Services

We’re now going to improve this hello-world example by making our pod accessible directly from our macbook’s web browser. That’s done by creating a ‘service’ object. Service: A service object is used to setup networking in our kube cluster. E.g. if a running pod exposes a web based gui, then a service object needs to […]

Read More

Hello World – Pods

In this walkthrough we will get an Apache web server (container) running inside our kube cluster. In Kubernetes we build objects. There are different types (aka kind) of objects, Pods, Services, Deployments,….etc. In our hello-world example we’ll start by building a Pod object. Pod: A pod main purpose is to house one or more containers. […]

Read More