I can't run Debug mode on the Cloud Code plugin in Pycharm

189 Views Asked by At

I want to debug my simple flask app (hello-world Skaffold sample) on the local Kubernetes cluster but when I click debug button, Skaffold runs in dev mode and doesn't open debug page.

Does anybody know what should I do to fix this problem?

my Scaffold config file is:

apiVersion: skaffold/v4beta2
kind: Config
metadata:
  annotations:
    debug.cloud.google.com/config: "{}"
  name: python-skaffold
build:
  local:
    push: true
    useDockerCLI: true
  artifacts:
  - image: 192.168.22.17:5001/python-hello-world
    context: src

manifests:
  rawYaml:
  - kubernetes-manifests/hello.deployment.yaml
  - kubernetes-manifests/hello.service.yaml

I tried all platforms (Minikube and Extera k8s cluster) but don't work.

1

There are 1 best solutions below

0
ali haririan On BEST ANSWER

I found the problem.

The problem was that the image name I used in the scaffold file differed from the image name in the deployment file, so it didn't work.

When running debug, it checks the image names in the files; if it's different, it doesn't work.