Skip to content
Tutorial on Using Docker and Kubernetes
Python Dockerfile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
arguments
k8s removed bad image name Jan 6, 2020
labs Fixing typo Jan 8, 2020
slides
.dockerignore
.editorconfig
.gitignore
Dockerfile
Dockerfile-tools
README.md
app.py
requirements.txt

README.md

Docker and Kubernetes Dojo

Tutorial on Using Docker and Kubernetes

Big thanks to Michael Frayer for most of the content of this tutorial is from him!

Presentation

The presentation that accompanies this workshop is available here: docker-and-kubernetes-dojo.pdf

This is provided to those that attended an in-person workshop who wish to reference back to topics discussed. Much of the context is missing for those that did't attend, however it is not required material in order to proceed with the rest of the workshop below.

Pre-requisites:

Generally speaking you need to have the Git client and Docker along with Kubernetes installed locally.

A console or shell environment

Some basic skills working with command line tooling are required to complete this tutorial as you will interact with the CLI often throughout. Windows Command prompt or Powershell is recommended for Window's users. MacOS and Linux users can use their shell of choice. It will be called out where there is a difference in CLI statements for Windows vs MacOS/Linux users.

Git

If you don't already have a Git Client, you can download the Git tools from here:

Docker & Kubernetes:

Here are links and instructions per operating system:

Windows
Mac
Linux

Testing your Installation

Run the docker version command and you should see something like this:

C:\Users\tarltob1>docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea
 Built:             Wed Nov 13 07:22:37 2019
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea
  Built:            Wed Nov 13 07:29:19 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
 Kubernetes:
  Version:          v1.14.8
  StackAPI:         v1beta2

Test kubernetes by running the kubectl get nodes command. This should show you one worker node running on your machine:

C:\Users\tarltob1>kubectl get nodes
NAME             STATUS   ROLES    AGE   VERSION
docker-desktop   Ready    master   45d   v1.14.8

If these both work, you should be ready to go.

Optional Pre-reqs (all OS's)

Install Visual Studio Code

You will be editing YAML files and viewing Python code during the course of this exercise. You can use any text editor, but Visual Studio Code is recommended.

Download and install VS Code

Install the JSON Formatter Chrome Extension

This is a useful, but not required, Chrome extension for viewing JSON output in your browser.

Install using a Chrome browser


~~ Labs ~~

  1. Intro to Docker and Containers

  2. Docker with Cloud Native App

  3. Kubernetes Intro

  4. Kubernetes Infrastructure as Code

  5. Docker for Tooling

  6. Kubernetes Environment Variables

  7. Kubernetes Override Starting Command

  8. Kubernetes Ingress

  9. Kubernetes Readiness

  10. Kubernetes Readiness Part 2


~~ Conclusion ~~

This exercise has introduced you to some of the most commonly used features of Kubernetes for configuring and hosting applications using declarative, Infrastructure as Code techniques. Even what we've shown here only begins to scratch the surface. Here are other topics you'll want to dig deeper on as you continue your Kubernetes journey.

You can’t perform that action at this time.