Close

kubernetes

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 […]

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 […]

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, […]

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. […]

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 […]

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 […]

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 […]

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 […]

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 […]

Read More

Install Kubernetes using Minikube

There are lots of other ways to build a kube cluster, such as kubeadm, or my favourite, Kubernetes the hard way. However, we will create a kube cluster locally on our workstation using Minikube. I should point that all the things I’ll demo in this course will work the same […]

Read More