Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to k8s cluster #94

Open
trahloff opened this issue Sep 29, 2017 · 3 comments
Open

Can't connect to k8s cluster #94

trahloff opened this issue Sep 29, 2017 · 3 comments

Comments

@trahloff
Copy link

Running the pipeline throws the error Node is not a Kubernetes node: for the step "Runing kubectl/helm tests"

@PeterKneale
Copy link

Same for me - ERROR: Node is not a Kubernetes node
I tried removing everything but the essentials and it still happens.
Any suggestions @lachie83?

#!/usr/bin/groovy

// load pipeline functions
// Requires pipeline-github-lib plugin to load library from github

@Library('github.com/lachie83/jenkins-pipeline@dev')

def pipeline = new io.estrado.Pipeline()

podTemplate(label: 'jenkins-pipeline', containers: [
    containerTemplate(name: 'jnlp', image: 'lachlanevenson/jnlp-slave:3.10-1-alpine', args: '${computer.jnlpmac} ${computer.name}', workingDir: '/home/jenkins'),
    containerTemplate(name: 'docker', image: 'docker:1.12.6', command: 'cat', ttyEnabled: true),
    containerTemplate(name: 'helm', image: 'lachlanevenson/k8s-helm:v2.6.0', command: 'cat', ttyEnabled: true),
    containerTemplate(name: 'kubectl', image: 'lachlanevenson/k8s-kubectl:v1.4.8', command: 'cat', ttyEnabled: true)
],
volumes:[
    hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
]){

  node ('jenkins-pipeline') {

    container('docker') {
        println  "In docker"
    }

    container('kubectl') {
        println  "In kubectl"
    }

    container('helm') {
        println  "In helm"
    }
  }
}

@salman-hayder
Copy link

@PeterKneale did you solve this issue? Now I'm having same issue...

@mrpity
Copy link

mrpity commented Mar 22, 2019

the same... any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants