Follow deploy/README.md to setup a kubegems cluster.
Start develop kubgems components base on above cluster.
Expose depend svc using NodePort in order we can access them locally.
sh scripts/generate-config-from-cluster.sh
make sure the
config/config.yaml
located on the project root.
vscode setting
// .vscode/launch.json
{
"name": "api",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd",
"cwd": "${workspaceFolder}",
"args": ["service"],
"env": {
"GEMS_PPROF_PORT": ":6060",
"EXPORTER_LISTEN": ":9100"
}
}
You can use the Bridge to Kubernetes to redirect remote traffic to the local debugable service.
// .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "bridge-to-kubernetes.resource",
"type": "bridge-to-kubernetes.resource",
"resource": "kubegems-api",
"resourceType": "service",
"ports": [8080],
"targetCluster": "kind-kubegems",
"targetNamespace": "kubegms",
"useKubernetesServiceEnvironmentVariables": true
}
]
}
go run cmd/main.go