Commit ddaeb745 authored by Bruce Flynn's avatar Bruce Flynn
Browse files


parent 94928751
# SSEC Brownbag: Kubernetes Q&A Minikube Example Code
# SSEC Brownbag: Kubernetes Q&A Example Code
Presented on 04 Nov, 2019 (Slides [here](
> NOTE: This is not intended as an example of best-practices for anything involved
......@@ -19,7 +19,7 @@ that will simply print out a message. There is also a Kubernetes
that will collect results and status from the Job and enter the data in a
PostgreSQL database, the results of which will be availble to view in the App.
It makes use of the following Kubernetes componets
It makes use of the following Kubernetes resources
* [Ingress](
* [Service](
......@@ -40,14 +40,39 @@ It makes use of the following Kubernetes componets
* Install `minikube`
## Start K8S with the required plugins
## MacOS Setup using Docker Desktop
If you have a Mac (or potententially Windows?) rather than use minikube you can use the [Docker Desktop]( app to provide a Kubernetes cluster.
Instructions courtesy of RayG
> helm can be had through macports (homebrew probably as well)
> ```
> sudo port install helm-2.14
> sudo port select --set helm helm2.14
> helm init --history=max 200
> ```
> ingress is also pretty quick to set up (note, can open ports to outside world!)
> ```
> kubectl apply -f
> kubectl apply -f
> ```
> those are from the instructions at
### Build our docker image
docker build -t say-hello .
## Minikube setup
### Start Minikube with the required plugins
minikube start
minikube addons enable helm-tiller
minikube addons enable ingress
## Build our docker image
### Build our docker image
eval $(minikube docker-env)
docker build -t say-hello .
......@@ -94,10 +119,8 @@ helm status myapp
The app will be available via its [Ingress]( and [Service]( which will proxy conections into
the cluster to one of the 3 replicas available at the minikube IP address:
echo http://$(minikube ip)/say-hello
the cluster to one of the 3 replicas available at the cluster address IP address. Using minikube it will be `http://$(minikube ip)/say-hello`, or using Docker Desktop it will simply be `http://localhost/say-hello`
If you navigate to the above URL you should see a simple form where you can enter in
some text. There should also be a table listing all the jobs currently in the database.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment