kubesphere devops流水线构建中的报错
kubesphere devops流水线构建中的报错
通过devops的流水线构建项目,出现的报错,以便后续自己学习
报错1:
Starting Kubernetes deployment
Loading configuration: /home/jenkins/agent/workspace/dev-demopqzh7/kubesphere-sample-dev/deploy/dev-ol/devops-sample-svc.yaml
ERROR: ERROR: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: java.net.UnknownHostException: lb.kubesphere.local: Name or service not known
hudson.remoting.ProxyException: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: java.net.UnknownHostException: lb.kubesphere.local: Name or service not known
处理方式:
将凭证中demo-kubeconfig 里面的 server: https://lb.kubesphere.local:6443 更改为 server: https://ip:6443
报错2:
Starting Kubernetes deployment
Loading configuration: /home/jenkins/agent/workspace/dev-demopqzh7/kubesphere-sample-dev/deploy/dev-ol/devops-sample-svc.yaml
ERROR: ERROR: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: Not Found
hudson.remoting.ProxyException: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: Not Found
处理方式:
将凭证中demo-kubeconfig 里面的 apiVersion: v1 更改为 apiVersion: apps/v1
同时拉取到报错最下面,或发现404 没有找到namespace
kubectl create namespace 项目名字
报错3:
No such file: /var/jenkins_home/jobs/pineconettbb7/jobs/dev/indexing/indexing.log
根据报错,可以知道是jenkins(jenkins_home)的相关的问题,找到相关容器id ,查看日志
kubectl logs po -n demo,然后点击执行,刷新,查看最新日志
登陆jenkins, 参考官方手册: https://v3-0.docs.kubesphere.io/zh/docs/devops-user-guide/how-to-use/jenkins-setting/
清理磁盘,报错消失 (因为初始就限制啦磁盘、内存等大小,所以也推荐以前扩大相关的磁盘、内存等)
报错4:
出现拉取公司jar包的报错
[ERROR] Failed to execute goal on project common: Could not resolve dependencies for project ai.ii.pinecone-cloud:common:jar:1.0.0-SNAPSHOT:
The following artifacts could not be resolved: ai.ii:middle-ware-util:jar:1.0.1-SNAPSHOT, ai.ii.commons:commons-base:jar:1.0: Could not find artifact ai.ii:middle-ware-util:jar:1.0.1-SNAPSHOT -> [Help 1]
解决:
将公司本地的settings覆盖,并保存
登陆jenkins http://node:30180/
点击保存
目录 返回
首页