Hyper-v

How To Manually Create a Docker and Kubernetes Dev Environment



With Docker Desktop now requiring licensing for certain organizations, the need for alternatives is growing. One alternative is to simply role a dev environment yourself. Using a VM, it’s not only possible, but generally pretty easy to create a place that has all the tools you need to develop container images and work with Kubernetes. In this video, you’ll learn how to set one up that can be used for all kinds of applications and workloads.

00:00 — Intro
02:17 — Install Docker
08:12 — Download and Connect the Docker CLI
13:31 — Testing out Docker
15:11 — Install Kubernetes (Minikube)
17:17 — Download and Connect the Kubenetes CLI (Kubectl)
25:28 — Testing out Minikube and Kubectl

# Install Docker:

curl -fsSL -o get-docker.sh
sh get-docker.sh

# Edit the Docker Service:
nano /lib/systemd/system/docker.service

ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376 –containerd=/run/containerd/containerd.sock

# Reload systemctl and restart Docker:

systemctl daemon-reload
systemctl restart docker

# Download the Docker client

# Set the environment variable DOCKER_HOST; x.x.x.x is the IP or hostname of your dev VM.

$Env:DOCKER_HOST = “x.x.x.x:2376”

# Install Kubernetes (Minikube)

curl –output minikube
cp minikube /usr/local/bin/minikube
chmod +x /usr/local/bin/minikube

#Create a Minikube context
apt install conntrack
minikube start –driver=none

#Download the Kubernetes CLI (Kubectl)

#Copy the config and certificates from:

/root/.kube/config
/root/.minikube/ca.crt
/root/.minikube/profiles/minikube/client.crt
/root/.minikube/profiles/minikube/client.key

source

 

To see the full content, share this page by clicking one of the buttons below

Related Articles

Leave a Reply