Jenkins service always pending on minikube

帅比萌擦擦* 提交于 2019-12-21 11:01:15

问题


I installed minikube on local.

Dashboard is 192.168.99.100:30000

I installed Jenkins by helm:

$ helm install stable/jenkins

Then the service always pending:

$ kubectl get services --namespace=default -w wandering-buffoon-jenkins
NAME                        CLUSTER-IP   EXTERNAL-IP   PORT(S)                          AGE
wandering-buffoon-jenkins   10.0.0.153   <pending>     8080:31326/TCP,50000:31090/TCP   26m

Why? So can't use external-ip to access it.


回答1:


I'm guessing that you didn't update the parameters to use NodePort instead of the default LoadBalancer. The minikube cluster doesn't support the LoadBalancer type so Kubernetes is looping trying to create a load balancer to get an external IP.

Use helm to see the options for the stable/jenkins chart:

$ helm inspect values stable/jenkins
# Default values for jenkins.
...
# For minikube, set this to NodePort, elsewhere use LoadBalancer
# Use ClusterIP if your setup includes ingress controller
  ServiceType: LoadBalancer
...

You can set this by doing something like this:

$ echo $'Master:\n  ServiceType: NodePort' > config.yaml
$ helm install -f config.yaml stable/jenkins



回答2:


Here is a single command for lazy people who do not want to create the separate config.yaml file

helm install --name jenkins --set Master.ServiceType=NodePort stable/jenkins

In case there are more than one option which you want to set, provide them as comma-separated

helm install --name jenkins --set Master.ServiceType=NodePort,Persistence.Enabled=false stable/jenkins

Also see the option available which you can set here. This is same as helm inspect command but more readable since available as a web page



来源:https://stackoverflow.com/questions/43933111/jenkins-service-always-pending-on-minikube

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!