https://kubernetes.io/fr/docs/tasks/tools/install-minikube/
Enable the default Minikube NGINX ingress addon. On macOS with Docker driver, keep minikube tunnel running in a separate terminal so the ingress address is reachable.
Reference doc: https://v1-33.docs.kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
Enable ingress:
minikube addons enable ingress
# Verify
kubectl get pods -n ingress-nginx
/!\ Important: keep minikube tunnel open to expose ingress on localhost
minikube tunnel
Add this line to your hosts file:
127.0.0.1 playerdata.minikube
https://argo-cd.readthedocs.io/en/stable/getting_started/
kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
- Start a port-forward in a dedicated terminal:
kubectl -n argocd port-forward svc/argocd-server 51242:443
- Open the dashboard in your browser:
http://localhost:51242
- Login with:
- Username:
admin - Password command:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 --decode; echo
- If your browser warns about certificate trust, continue to the page (self-signed cert on local setup).
- Golang https://go.dev/learn/
- Delve ( go debugger )
- Vscode launch config are included :
- Run the golang app natively with go delve
- Run the app within docker
- Send a curl request to retrieve the player-data
The docker image of the app is published on GHCR
ghcr.io/pierre-zachary/opusmajor:main
- How to render the kustomization
kubectl kustomize k8s/player-data
- Install the app in your cluster:
kubectl apply -f https://raw.githubusercontent.com/Pierre-ZACHARY/opusmajor/refs/heads/main/argocd/player-data-application.yaml
- Check sync/health:
kubectl -n argocd get application player-data
kubectl -n player-data get deploy,pods,svc,hpa
This repository includes a simple test-only observility stack with Grafana, Prometheus, Loki, Pyroscope and Alloy
- Install the Argo CD application:
kubectl apply -f https://raw.githubusercontent.com/Pierre-ZACHARY/opusmajor/refs/heads/main/argocd/observability-application.yaml
- Check sync/health:
kubectl -n argocd get application observability
kubectl -n observability get deploy,pods,svc
- Open Grafana:
kubectl -n observability port-forward svc/grafana 3000:3000
Then open:
http://localhost:3000
Dashboard link:
http://localhost:3000/d/afqjcyw0mp91cc/player-data
Default credentials:
- Username:
admin - Password:
admin
Kubernetes routes requests for playerdata.minikube to this app through the Ingress resource in this repo.
Test ingress routing:
curl http://playerdata.minikube/player-data
The Ingress host is built as playerdata.<ROOT_URL>.
- Edit
ROOT_URLink8s/player-data/kustomization.yaml:
configMapGenerator:
- name: player-data-config
literals:
- ROOT_URL=minikube
-
Replace
minikubewith your own suffix, for examplelocal. -
Re-apply manifests:
kubectl apply -k k8s/player-data
- Add/update your local hosts entry to match the new hostname, for example:
127.0.0.1 playerdata.local
- Test with the new URL:
curl http://playerdata.local/player-data
OpenAPI spec file:
docs/swagger.json
- Open:
https://editor.swagger.io/
- Click File -> Import File and select:
docs/swagger.json
Run:
docker run --rm -p 8081:8080 -e SWAGGER_JSON=/app/swagger.json -v "$(pwd)/docs/swagger.json:/app/swagger.json" swaggerapi/swagger-ui
Then open:
http://localhost:8081