Skip to content

erisnar/simple-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes, Redis and Go

In this simple project we explore Kubernetes solutions with a Go application and a redis backend database.

mermaid

Usage

I host Kubernetes locally with minikube. The build process takes advantage of the minikube Docker daemon to build and host container images for Kubernetes to consume.

Build

make build

Deploy

make deploy

Forward

To access pods on the minikube node we need to either forward the minikube port to localhost, or ssh into the minikube node to access the pods directly. Forward the webserver port to localhost with:

make forward

Examples

POST

➜  curl -X POST -H "Content-Type: application/json" -d '{"Key":"foo", "Value":"bar"}' localhost:8080
Wrote foo:bar to database

GET

➜  curl localhost:8080/foo
Getting value of key: foo
Value: bar

Other

Currently only POST and GET calls are supported:

➜  curl -X DELETE localhost:8080/foo
404

Blog

Read more on my blogpost.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published