This is a simple API for testing different tools.
- Clone project
go get github.com/pablosilvab/golang-docker
- Go to folder
cd ~/go/src/github.com/pablosilvab/golang-docker
- Download dependencies
go mod download
- Run project locally
make go-run
- Compile the code and generate an executable
make go-build
- Run the executable
make go-shell
- Build new image
make docker-build
- Generate tag
make docker-tag
- Run container
make docker-run
- Helm
- Tiller
Install package in Kubernetes:
make helm-install
Remove release in Kubernetes:
make helm-uninstall
List all releases:
helm ls --all
- Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?
Review .gitlab-ci.yml
file.
- User "system:serviceaccount:default:default" cannot get at the cluster
Grant permissions with ClusterRoleBinding
.
helm create charts
To run elasticsearch in K8s for this exercise I use helm
- Add repository elastic
helm repo add bitnami https://charts.bitnami.com/bitnami
- Install helm chart
helm install elastic bitnami/elasticsearch
- Uninstall chart
helm delete --purge elastic
- Expose the service
kubectl port-forward --namespace default svc/elastic-elasticsearch 9200:9200