Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onitake/godemo
Just a small Go container demo
https://github.com/onitake/godemo
Last synced: 8 days ago
JSON representation
Just a small Go container demo
- Host: GitHub
- URL: https://github.com/onitake/godemo
- Owner: onitake
- Created: 2019-12-05T07:53:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-05T18:30:44.000Z (about 5 years ago)
- Last Synced: 2023-03-24T02:07:50.192Z (almost 2 years ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Container Demo
A basic example to show off how to build a container and a corresponding
Kubernetes deployment, including ingress and metrics.## Prerequisites
* A Kubernetes cluster
* A container registry or Docker Hub account
* (Optional) An ingress controller that can provide TLS certificates automatically
* Prometheus operator in your cluster
* docker and kubectl## Development Build
go build
## Container Build
Replace xyz with your container registry prefix or Docker Hub user name.
docker built -t xyz/godemo .
## Push To Registry
docker push xyz/godemo
## Deploy
Find the line that looks like `image: .../godemo` in deployment.yml and
replace it with the container tag above first.Then find the lines that look like `... godemo.my-kubernetes-cluster` and put
a domain name that points to your cluster there.kubectl apply -f deployment.yml
Then use your web browser to connect to [http://godemo.my-kubernetes-cluster]
(or [https://godemo.my-kubernetes-cluster] if you have TLS support).