KubeSphere版本信息
操作系统信息 Ubuntu20.04,8C/16G 3台:101(master),102,103

Kubernetes版本信息 v1.21.5

容器运行时 docker: 20.10.8

KubeSphere版本信息 v3.2.1。在线全套安装。

devops-jenkis pod一直没有部署完毕,显示

  Warning  Unhealthy  30m (x47 over 43m)     kubelet            Liveness probe failed: Get "http://10.233.93.28:8080/login": dial tcp 10.233.93.28:8080: connect: connection refused
  Normal   Pulled     10m                    kubelet            (combined from similar events): Successfully pulled image "kubesphere/ks-jenkins:v3.2.0-2.249.1" in 15.510751957s
  Warning  Unhealthy  5m22s (x151 over 43m)  kubelet            Readiness probe failed: Get "http://10.233.93.28:8080/login": dial tcp 10.233.93.28:8080: connect: connection refused
  Warning  BackOff    17s (x40 over 15m)     kubelet            Back-off restarting failed container

pod 日志如下

 Picked up JAVA_TOOL_OPTIONS: -Xms512m -Xmx512m -XX:MaxRAM=2g -Dhudson.slaves.NodeProvisioner.initialDelay=20 -Dhudson.slaves.NodeProvisioner.MARGIN=50 -Dhudson.slaves.NodeProvisioner.MARGIN0=0.85 -Dhudson.model.LoadStatistics.clock=5000 -Dhudson.model.LoadStatistics.decay=0.2 -Dhudson.slaves.NodeProvisioner.recurrencePeriod=5000 -Dio.jenkins.plugins.casc.ConfigurationAsCode.initialDelay=10000 -verbose:gc -Xloggc:/var/jenkins_home/gc-%t.log -XX:NumberOfGCLogFiles=2 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=100m -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions 

 Running from: /usr/share/jenkins/jenkins.war

 webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")

 2022-05-13 02:39:10.241+0000 [id=1]	INFO	org.eclipse.jetty.util.log.Log#initialized: Logging initialized @515ms to org.eclipse.jetty.util.log.JavaUtilLog

 2022-05-13 02:39:10.649+0000 [id=1]	INFO	winstone.Logger#logInternal: Beginning extraction from war file

重启也不行,一直是处于0/1 Running状态

initialDelaySeconds: 试试把这个值调的大一点看看。

    Rick

    延长到五分钟后提示这样

    Events:
      Type     Reason     Age               From               Message
      ----     ------     ----              ----               -------
      Normal   Scheduled  7m13s             default-scheduler  Successfully assigned kubesphere-devops-system/devops-jenkins-fc65b6686-mwwcm to ks-node-2
      Normal   Pulling    7m7s              kubelet            Pulling image "kubesphere/ks-jenkins:v3.2.0-2.249.1"
      Normal   Pulled     6m51s             kubelet            Successfully pulled image "kubesphere/ks-jenkins:v3.2.0-2.249.1" in 15.650884182s
      Normal   Created    6m49s             kubelet            Created container copy-default-config
      Normal   Started    6m48s             kubelet            Started container copy-default-config
      Normal   Pulling    6m46s             kubelet            Pulling image "kubesphere/ks-jenkins:v3.2.0-2.249.1"
      Normal   Pulled     6m30s             kubelet            Successfully pulled image "kubesphere/ks-jenkins:v3.2.0-2.249.1" in 16.075113974s
      Normal   Created    6m28s             kubelet            Created container devops-jenkins
      Normal   Started    6m27s             kubelet            Started container devops-jenkins
      Warning  Unhealthy  82s               kubelet            Readiness probe failed: Get "http://10.233.82.17:8080/login": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
      Warning  Unhealthy  3s (x9 over 81s)  kubelet            Liveness probe failed: HTTP probe failed with statuscode: 503
      Warning  Unhealthy  3s (x8 over 73s)  kubelet            Readiness probe failed: HTTP probe failed with statuscode: 503
    1 年 后

    问题已经初步找到了解决办法:注释或删除yaml中的livenessProbe 和 readinessProbe 探针。

    具体操作步骤如下:

    进入`应用负载 –> 工作负载 –> devops-jenkins –> 更多操作(编辑YAML)',将livenessProbe 和 readinessProbe 注释或删除。

      3 个月 后

      harrymore 有些 devops-jenkins 启动失败的场景是内存不足导致的,可以尝试增大 devops-jenkins 的 内存配置;