Closed gmacario closed 5 years ago
Reopening issue as a reminder that I should understand how to configure the plugin to talk to an external Kubernetes cluster - See conversation in #289 for my initial attempts
Try configuring Jenkins to connect to Kubernetes cluster "kube-101" on GCP
Reference: https://cloud.google.com/solutions/configuring-jenkins-kubernetes-engine
See also: https://github.com/jenkinsci/kubernetes-plugin/blob/master/README.md sections
Locally testing on nemo (Ubuntu 18.04.1 LTS 64-bit)
Browse https://console.cloud.google.com > Kubernetes Engine > Clusters
gcloud init
gcloud container clusters list
gcloud container describe kube-101
gcloud container clusters get-credentials kube-101
kubectl config view
kubectl cluster-info
kubectl get namespaces
kubectl create namespace easy-jenkins
Jenkins > Manage Jenkins > Configure System
kube-101
(from GCP console > Clusters)easy-jenkins
admin
(paste from GCP console: Cluster credentials > Username)Click "Test Connection" and make sure that
Connection test successful
Continue configuring Kubernetes Cloud "kube-101"
jnlp slave
jenkins/jnlp-slave
/home/jenkins
/bin/sh -c
cat
then click "Save"
Test:
Jenkins > Open Blue Ocean > New Pipeline
The multibranch pipeline is loaded and started, however the build of branch "feature/kube-declarative-pipeline" never starts
This situation can also be detected by looking at the Kubernetes dashboard of cluster "kube-101", namespace "easy-jenkins":
It looks look like that the Pods mypod-kr0c7-xxxx
running inside Kubernetes cluster "kube-101" on GCP are unable to connect to our Jenkins master, since the URL http://nemo.gmacario.it:9080 is behind a corporate firewall.
Closing issue, will reopen when we able to test both Jenkins master as well as the slaves deployed on the same Kubernetes cluster, or at least with some capability of communicating to each other.
Detailed instructions to deploy a Jenkins cluster on Kubernetes posted at https://gmacario.github.io/howto/kubernetes/gcp/jenkins/2018/10/09/install-jenkinsx-on-gcp.html
References: