# Stuck! New k8s install, \`stage\` is not recognized in scripted pipeline using podTemplate

**URL:** <https://community.jenkins.io/t/stuck-new-k8s-install-stage-is-not-recognized-in-scripted-pipeline-using-podtemplate/7938>\
**Category:** Using Jenkins\
**Created:** [June 10, 2023, 9:26pm UTC](https://community.jenkins.io/t/stuck-new-k8s-install-stage-is-not-recognized-in-scripted-pipeline-using-podtemplate/7938 "2023-06-10T21:26:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdruth](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/bdruth/32/4528_2.png) [@bdruth](https://community.jenkins.io/u/bdruth)\
**Post date:** [June 10, 2023, 9:26pm UTC](https://community.jenkins.io/t/stuck-new-k8s-install-stage-is-not-recognized-in-scripted-pipeline-using-podtemplate/7938/1 "2023-06-10T21:26:34Z")

</div>

I’m getting to my wits end. I’m trying to reproduce an issue from our corporate CBJ env, so I used the helm install to standup CBJ on my local k8s cluster. Seems good, using the kubernetes cloud provider with all defaults except to use websockets instead of TCP direct connect. I have a super simple pipeline defined so far just to test that the setup is sound:

```auto
podTemplate(yaml: '''
apiVersion: v1
kind: Pod
spec:
  containers:
    - name: java17
      image: amazoncorretto:17-alpine-full
      command:
        - tail
      args:
        - -f
        - /dev/null
''') {
    node(POD_LABEL) {
        stage("test") {
            container('java17') {
                sh "java -version"
            }
        }
    }
}

```

The error I get is

```auto
java.lang.NoSuchMethodError: No such DSL method 'stage' found among steps [...]

```

it then exhaustively lists every other possible step. If I remove the `stage` block, making `container` the first block under `node(..)`, then it works as expected, output:

```auto
+ java -version
openjdk version "17.0.7" 2023-04-18 LTS
OpenJDK Runtime Environment Corretto-17.0.7.7.1 (build 17.0.7+7-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.7.7.1 (build 17.0.7+7-LTS, mixed mode, sharing)

```

My research has found that there’s a pipeline-stage-step plugin, but it doesn’t show up as an available plugin to install, nor does it show up as an installed plugin. If I use the Jenkins CLI,

```auto
java -jar jenkins-cli.jar -s http://cloudbees.my-local-domain/cjoc/ -auth USER:PASS install-plugin https://updates.jenkins.io/download/plugins/pipeline-stage-step/305.ve96d0205c1c6/pipeline-stage-step.hpi

```

It says it’s _Installing a plugin from …_ - but nothing changes on Jenkins (pipeline doesn’t work, can’t see this plugin available or installed).

I’ve got a fair few years around the Jenkins block, but this has me stumped. Anyone have any idea what’s going on?

Thanks in advance!  
Cheers.

---

<div class="post-metadata">

**Author:** ![bdruth](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/bdruth/32/4528_2.png) [@bdruth](https://community.jenkins.io/u/bdruth)\
**Post date:** [June 10, 2023, 9:57pm UTC](https://community.jenkins.io/t/stuck-new-k8s-install-stage-is-not-recognized-in-scripted-pipeline-using-podtemplate/7938/2 "2023-06-10T21:57:59Z")

</div>

OK, still not sure what’s going on, but I started uninstalling other plugins (GitHub related) and now suddenly I can see the stage step plugin and the pipeline works … 🤯
