Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 1.27 KB

quick-start.md

File metadata and controls

65 lines (51 loc) · 1.27 KB

Quick Start

Deploy

Follow deploy/README.md to setup a kubegems cluster.

Develop

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.

Using vscode

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
    }
  ]
}

Manually

go run cmd/main.go