Skip to content

A Sample Rest API application written in go. includes a helm chart for Kubernetes

Notifications You must be signed in to change notification settings

askcloudarchitech/go-rest-api-kubernetes-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoLang REST API With Kubernetes Helm Chart EXAMPLE Project

A fully functional EXAMPLE project written in Go showing how to create a REST API and deploy to Kubernetes!

This project is an example that was built along with a Youtube Series showing how to create a custom REST API in Golang. Every part of this project is sample code which shows how to do the following:

  • Create a custom web server with Golang using HTTPRouter
  • Create a simple REST API that serves Youtube stats (as an example use case)
  • Automatically containerize and push a Docker container to Docker hub using Github Actions
  • Create a Kubernetes Helm chart for deploying your API to Kubernetes
  • Push your Helm chart to a Helm Chart repo using Github Actions and Github Pages (coming soon)
  • How to write a good README (you are reading it now!)

Watch the full series!

Watch the series

How to install this example Golang project on Kubernetes

The easiest way to see how this works is to watch the series, but here's the short version.

  1. clone this project
  2. Set up a local kubernetes cluster - https://askcloudarchitech.com/posts/tutorials/local-kubernetes-startup-script/
  3. Install helm - brew install helm
  4. Setup your keys - see the video here - https://www.youtube.com/watch?v=k0L_yR30PqI&list=PLSvCAHoiHC_rqKbcu1ummWVpLTDBNZHH7&index=5
  5. Install with Helm

How to tweak this project for your own uses

Since this is an example project, I'd encourage you to clone and rename this project to use for your own puposes. It's a good starter boilerplate

Find a bug?

If you found an issue or would like to submit an improvement to this project, please submit an issue using the issues tab above. If you would like to submit a PR with a fix, reference the issue you created!

Known issues (Work in progress)

This tutorial is till ongoing. The automation of the helm chart repo has not been completed yet. This is coming soon!

Like this project?

If you are feeling generous, buy me a coffee! - https://www.buymeacoffee.com/askcloudtech