Posts

Showing posts with the label Kubernetes

A simplified version of Kubernetes Network for developing on Windows and WSL and Docker Desktop

Image
Pictures always help. We can use this one to put together a basic description of how the Windows, WSL2 Linux distributions, and Docker on WSL and Kubernetes talk to each other over localhost. We’ll cover why you got to do things like port-forwarding or proxy with a Kubernetes network. There is asymmetric behavior between the different components. I'm sure somebody knows the magical explanation.  Click to enlarge Video Walkthrough Magical localhost networking with Docker WSL2 Windows and Linux Heavily Edited Video Transcript You have a Windows host with its ethernet adapter. Each Linux WSL2 instance has an eth0 network adapter. The Windows host and WSL instances are attached to a private network on the Ethernet Switch (WSL) Then you have the localhost adapter. WSL makes it look like localhost is visible to all WSL instances and to the Windows host.  A port on WSL2 127.0.0.1 is also available on any other WSL2 instance and from the Windows host all on 127.0.0.1.  ...

Single Node Kubernetes with Docker Desktop

Image
You can run Single-node Linux Kubernetes clusters with full Linux command line support using Docker Desktop and Windows WSL2.  Docker Desktop makes this simple. This is probably obvious to everyone. I wrote this to capture the commands to use as a future reference. There is another article that discusses  Creating a multi-node Kubernetes Cluster on a single machine using Kind http://joe.blog.freemansoft.com/2020/07/multi-node-kubernetes-with-kind-and.html Windows 10 / 11 - WSL2 - Docker The simplest way to run Kubernetes Windows 10 is with the Docker Desktop and WSL2 integration.  Docker will prompt to enable WSL2 integration during installation if you are running a late enough version of Windows 10 or any Windows 11. Prerequisites Docker is installed with WSL2 integration enabled.  The docker command operates correctly when you type a docker  command in a WSL linux command prompt. Install, Enable and Verify Install Docker Enab...

Azure PaaS is Dead - Death by Container

Image
One of Azure's big initial innovations was their PaaS platforms.  These services were a level up  from most of Amazon's offerings. Microsoft appears to be in the process of killing of their traditional offerings. They are instead exposing the containerized underpinnings and forcing customers to do their own packaging and Docker image construction.  This makes sense for large enterprises but means that teams need to understand the underlying O/S software modules and system components that may need to be installed in their containers. PaaS PaaS makes it easier for less sophisticated teams to deploy sophisticated scalable applications. Azure PaaS lets customers deploy applications without worrying about the Operating System, System Patching, CVE security scanning , load balancing, log aggregation, or other issues.  The opacity of the underlying system meant teams had to know less and that teams couldn't know more if they wanted too. Microsoft modernized much of their Pa...

Kubernetes Dashboard with multi-node Kubernetes on a laptop.

Image
The Kubernetes web based dashboard can make it easy to see the health and activity in your Kubernetes container environment. I'l show you how to run the Kubernetes monitoring dashboard on a local multi-node cluster using this guide. All this work was done on a local machine and not in a cloud environment. The Kubernetes container orchestration environment is primarily command line and API based. They do have a graphical dashboard that can be used to surf through your Kubernetes cluster, the deployments and other information.  The dashboard is not difficult to install but it does have a few hidden corners.   Topology We're going to run a 3 worker node Kubernetes cluster.  We'll deploy 6 replicant copies of Nginx into the cluster along with the dashboard components.  Note that the dashboard installs agents into each of the nodes. Video Install Docker, Kubernetes, and Kind. Then deploy containers You must have Docker and Kubernetes installed. You get more inte...

Multi-Node Kubernetes with KIND and Docker Desktop

Image
You can run multi-node Linux Kubernetes clusters with full Linux command line support using the KIND project for Kubernetes. Lets walk through how you can set up a multi-node Kubernetes cluster on a single machine as a learning environment and CI/CD testing environment. Video Windows 10 - WSL2 - Docker The best way to run Linux Docker containers on Windows 10 is with the WSL2 integration.  Docker will offer to enable WSL2 integration as part of its' installation if you are running a late enough version of Windows 10.  All of the commands are the same from the windows prompt or from a unix prompt.  Open a Linux/Unix prompt if you have WSL2 or are running this on a mac. Open a GIT Bash prompt on Windows with Docker without WSL2 Install, Enable and Verify Open up a Linux command prompt. Change directory to a writable directory. The script below will need it. Verify Kubernetes isn't alread...

Deploying and exposing a stateless app with Kubernetes and Docker Desktop

Image
Kubernetes and Containers are becoming the defacto standard for cloud deployments. It seems like every PaaS platform is now running docker with K8s under the hood. I thought I understood it until I actually used it. Here is a quick run through deploying a stateless app in Kubernetes on a Windows 10 using a single node Docker Desktop cluster. We will run two copies of NGINX in the cluster so they will both be on the single K8s worker node.  Kubernetes apps aren't visible to the host machine by default so we will use the kubctl proxy to provide access. I actually ran this on a Kind provisioned K8s cluster with 3 worker nodes and two control plain nodes.  This let me run multiple worker nodes that I could spread the deployed containers across. Video Deploy App - Make endpoint visible to host browser We need to deploy the application and then make it visible to browsers on the host. We will deploy two replicas of the application on your 3 nod network. They should end up ge...