DEV Community

Cover image for Debug Kubernetes Operator-sdk v1.0.0 locally in Goland
Austin Cunningham
Austin Cunningham

Posted on

Debug Kubernetes Operator-sdk v1.0.0 locally in Goland

Wrote this Debug Kubernetes Operator-sdk locally in Goland last year before the first major release of the Operator-sdk . Due to changes in the Operator-sdk it's not valid for version v1.0.0 and greater.

Here are the steps to get debug running with v1.0.0

  • In Goland go to Run\Edit Configurations
  • Select Go Build\+
  • Give the configuration a name
  • In Files add the path to main.go
  • In Environment add WATCH_NAMESPACE=your-operators-namespace

Setup goland debug

You can then run the debug from the Run menu

  • Go to run\debug
  • Select the configuration name you just setup
  • Debug will start and stop at break points Alt Text

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay