vijethph / go-apps

Collection of apps developed as part of learning Go Course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues


Go Apps

Collection of things built following Go and Kubernetes tutorials

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. License
  5. Contact
  6. Acknowledgments

About The Project

Collection of things built following Go and Kubernetes tutorials

Built With

  • Go
  • Docker
  • Kubernetes

(back to top)

Getting Started

The repository has multiple branches for fibo-k8s app based on deployment methods. Instructions for deployments are mentioned in respective branches.

  • main branch contains files that can be run using Docker Compose (docker-compose up)
  • minikube-skaffold branch contains files that can be run using minikube or Skaffold
  • eks-aks branch contains files that can be deployed to AWS Elastic Kubernetes Service (EKS) or Azure Kubernetes Service (AKS)
  • gke-with-nginx branch contains files that can be deployed to Google Kubernetes Engine (GKE) using GitHub Actions

Deploy using minikube

  1. Install kubectl and minikube. Then run these commands in order:
minikube start

minikube addons enable ingress

kubectl cluster-info
  1. Now, switch to minikube's docker daemon, as minikube runs in VM, and cannot use local images on its own. So, all docker images need to be built within minikube's docker daemon. Then, deploy the kubernetes cluster
eval $(minikube docker-env)

# docker build all images after above command

kubectl create secret generic pgpassword --from-literal PG_PASSWORD=Test@123

kubectl apply -f fibo-k8s

kubectl get pods --watch

minikube ip
  1. Open the IP address provided by minikube in a browser to access the application.

Deploy using Skaffold

  1. Follow the steps 1 and 2 from minikube deployment with certain changes:
# instead of "kubectl apply -f k8s", run the following command

skaffold dev # or skaffold run

minikube ip
  1. Open the IP address provided by minikube in a browser to access the application.

Teardown for locally created resources

kubectl delete -f fibo-k8s

skaffold delete

minikube stop

minikube delete --all

# switch back to normal docker daemon
eval $(minikube docker-env -u)

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Vijeth P H - @vijethph

Project Link: https://github.com/vijethph/go-apps

(back to top)

Acknowledgments

(back to top)

About

Collection of apps developed as part of learning Go Course

License:MIT License


Languages

Language:Go 57.6%Language:TypeScript 25.7%Language:Dockerfile 8.2%Language:HTML 6.4%Language:JavaScript 2.1%