Skip to content

Instantly share code, notes, and snippets.

@rberrelleza
Last active December 4, 2018 21:32
Show Gist options
  • Save rberrelleza/2e7d3368a8bd605a9dc14fa0c81ee7a4 to your computer and use it in GitHub Desktop.
Save rberrelleza/2e7d3368a8bd605a9dc14fa0c81ee7a4 to your computer and use it in GitHub Desktop.
Helm development
  1. Set the context of kubectl with your dev cluster and your namespace. (e.g. kubectl config use-context gke_development-123_europe-west4-c_europe --namespace=ramiro)
  2. Update to the lastest cnd version: go get github.com/okteto/cnd
  3. Install syncthing
  4. Export your deployment manifest: kubectl get --export deployment "$YOUR_DEPLOYMENT" -oyaml > deployment.yml
  5. Create a cnd.yml file:
swap:
  deployment:
    file: deployment.yml
    container: api 
    image: golang:1.11
mount:
  source: ~/go/src/bitbucket.org/okteto/okteto/backend
  target: /go/src/bitbucket.org/okteto/okteto/backend
  1. Start developing wiht CND by running cnd up
  2. Run cnd exec allows you to execute commands directly in the container (e.g. cnd exec -- go test ./...)
  3. To return to your normal deployment run cnd down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment