Skip to content

My Hello World application written in Go, built with Docker, deployed with Kubernetes.

License

Notifications You must be signed in to change notification settings

RobertYoung/my-hello-world-app-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Hello World App

Overview

Write a simple hello world application in any one of these languages: Python, Ruby, Go. Build the application within a Docker container and then load balance the application within minikube. You are not required to automate the installation of minikube on the host machine.

Prerequisites

Endpoints

Route Description
/health Health check for the application
/echo Returns basic information on the host

Commands

Builds and deploys the application to Minikube:

make deploy

Other commands:

> make help

    Choose a command to run in my-hello-world-app-go:

      install             Install missing dependencies. Runs `go get` internally. e.g; make install get=github.com/foo/bar
      start               Start in development mode
      stop                Stop development mode.
      compile             Compile the binary.
      exec                Run given command, wrapped with custom GOPATH. e.g; make exec run="go test ./..."
      clean               Clean build files. Runs `go clean` internally.
      test                Run the unit tests
      deploy              Builds and deploys the application to Minikube
      minikube-validate   Checks whether minikube is running
      minikube-start      Start minikube using kubernetes version 1.16.4
      k8s-set-minikube    Sets the kubernetes context to minikube and the hello-world namespace

Things to Try

When you've got the application running, navigate to the /echo route and view the hostname, which is the name of the pod.

# replace the hostname and delete the pod
kubectl delete --namespace hello-world pod {HOSTNAME}

Reload the application, and it will assign you a healthy pod.

TODO

  1. Implement static analysis tools, such as golint
  2. Deploy to EKS
  3. Implement a more advanced web framework, such as Revel
  4. Package the application using helm

About

My Hello World application written in Go, built with Docker, deployed with Kubernetes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published