欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

上私有云k8s问题记录

时间:2023-07-13
一、拉取github内容时显示无法建立SSL连接

解决方法:拉取github内容时显示无法建立SSL连接

二、Docker Desktop for Mac/Windows 开启 Kubernetes

Docker Desktop for Mac/Windows 开启 Kubernetes

三、mac cannot list resource 403问题

解决方法

四、k8s 创建 mysql

k8s 创建 mysql

五、创建ingress

创建ingress

六、k8s yaml 版本兼容问题

error: unable to recognize "depoly.yaml": no matches for kind "ValidatingWebhookConfiguration" in version "admissionregistration.k8s.io/v1beta1"

K8S的apiVersion版本详解

七、yaml 验证问题

error: error validating "depoly.yaml": error validating data: [ValidationError(ValidatingWebhookConfiguration.webhooks[0]): missing required field "sideEffects" in io.k8s.api.admissionregistration.v1.ValidatingWebhook, ValidationError(ValidatingWebhookConfiguration.webhooks[0]): missing required field "admissionReviewVersions" in io.k8s.api.admissionregistration.v1.ValidatingWebhook]; if you choose to ignore these errors, turn validation off with --validate=falseapiVersion: admissionregistration.k8s.io/v1kind: ValidatingWebhookConfigurationmetadata: name: "pod-policy.example.com"webhooks:- name: "pod-policy.example.com" rules: - apiGroups: [""] apiVersions: ["v1"] operations: ["CREATE"] resources: ["pods"] scope: "Namespaced" clientConfig: service: namespace: "example-namespace" name: "example-service" caBundle: "Ci0tLS0tQk...<`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.>...tLS0K" admissionReviewVersions: ["v1", "v1beta1"] sideEffects: None timeoutSeconds: 5

解决方法:增加了如下两个配置

八、镜像无法下载问题

MountVolume.SetUp failed for volume "webhook-cert" : secret "ingress-nginx-admission" not foundLiveness probe failed: HTTP probe failed with statuscode: 500Exec lifecycle hook ([/wait-shutdown]) for Container "controller" in Pod "ingress-nginx-controller-775b4cb4d7-knxkk_ingress-nginx(d39ff541-f805-4863-892c-886250078e4f)" failed - error: command '/wait-shutdown' exited with 137: , message: ""Failed to pull image "k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660": rpc error: code = Unknown desc = Error response from daemon: Get "https://k8s.gcr.io/v2/": context deadline exceeded

无法访问k8s.gcr.io下载镜像问题解决办法

九、unknown field “backend” in io.k8s.api.networking.v1.IngressSpec

解决方法

十、K8S_1.22部署ingress

K8S_1.22部署ingress

十一、brew install jenkins

/usr/local/Cellar/openjdk@11/11.0.12: 679 files, 297.9MB
/usr/local/Cellar/jenkins/2.309: 8 files, 72.1MB

十二、Jenkins拉取Gitlab项目代码配置SSH Keys

拉取gitlab代码

十三、三万字无坑搭建基于Docker+K8S+GitLab/SVN+Jenkins+Harbor持续集成交付环境!!

搭建基于Docker+K8S+GitLab/SVN+Jenkins+Harbor持续集成交付环境

十四、查看linux信息

查看linux信息

十五、k8s 命令

删除一个空间下的所有pod
kubectl delete --all pods --namespace=kube-system

十六、k8s rancher2 kubesphere3 jenkins 部署 SpringCloud 微服务

k8s rancher2 kubesphere3 jenkins 部署 SpringCloud 微服务

十七、部署redis 、mysql

参考kubesphere 官网
1、kubesphere 应用商店参考官网,注意有两个 OpenPitrix 设置为true
2、kubesphere 部署mysql 报错,是因为密码没有设置10位。 Aa12345678

十八、jenkins 部署服务

k8s+jenkins:部署SpringCloud微服务
KubeSphere:harbor+gitlab+nexus+springboot流水线部署

十九、script.sh: mvn: not found

解决方法:1、重新打包镜像,把maven打包进去
2、把宿主机的maven挂载进去

二十、Kubernetes之动态Jenkins slave

Kubernetes之动态Jenkins slave

二十一、Docker安装nexus3,搭建maven私服

Docker安装nexus3,搭建maven私服

二十二、spring cloud 教程

spring cloud 教程
十次方项目

二十三、SpringCloud微服务实战——搭建企业级开发框架

SpringCloud + Docker + k8s实现微服务集群打包部署

二十四、问题如下

[ERROR] Plugin com.spotify:dockerfile-maven-plugin:1.3.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.spotify:dockerfile-maven-plugin:jar:1.3.6: 1 problem was encountered while building the effective model
[ERROR] [FATAL] Non-parseable POM /root/.m2/repository/com/spotify/dockerfile-maven-plugin/1.3.6/dockerfile-maven-plugin-1.3.6.pom: end tag name must be the same as start tag from line 6 (position: TEXT seen … href="./css/style.css" rel=“stylesheet” type=“text/css”>rn… @7:8) @ line 7, column 8
[ERROR] -> [Help 1]
这个问题主要是对应jar 相应 的pom 下载不下来造成的,因为公司的出口ip限制导致的。
解决方法:是先把对应的jar目录删除后,在家里重新下载,然后拷贝到公司

二十五、NoRouteToHostException No route to host

解决方法:关闭了harbor服务器防炎墙

二十六、问题如下

Caused by: org.apache.maven.plugin.MojoExecutionException: Build image failed, perhaps you should use a registry that supports HTTPS so credentials can be sent safely, or set the ‘sendCredentialsOverHttp’ system property to true

sh “ M A V E N H O M E / b i n / m v n − D s k i p T e s t s = t r u e c l e a n i n s t a l l − P {MAVEN_HOME}/bin/mvn -DskipTests=true clean install -P MAVENH​OME/bin/mvn−DskipTests=truecleaninstall−P{params.Environment} ${BuildParameter} -DsendCredentialsOverHttp=true -e”

解决方法:命令行上加了 -DsendCredentialsOverHttp=true这个参数

二十七、ClassNotFoundException:com.sun.tools.javac.code.TypeTags

解决方法

二十八、Failed to pull image “10.10.10.131/mom/sx-gateway:2.4.0”: rpc error: code = Unknown desc = Error response from daemon: Get “https://10.10.10.131/v2/”: dial tcp 10.10.10.131:443: connect: connection refused

解决方法

二十九、好博客:全栈程序员

https://www.cnblogs.com/FullStackProgrammer/p/15710676.html

三十、k8s版jenkins–master/slave模式实现CI/CD—带solo开源博客项目–带maven、djk、git工具

k8s版jenkins–master/slave模式实现CI/CD

三十一、基于Kubernetes安装Jenkins并配置操作环境

基于Kubernetes安装Jenkins并配置操作环境

三十二、jenkins docker: not found

基于Kubernetes安装Jenkins并配置操作环境

三十三、error: You must be logged in to the server (the server has asked for the client to provide credentials)

https://my.oschina.net/u/1271447/blog/3093877

三十四、定时任务启动 Couldn’t get host name

解决方法:在/etc/host 文件中增加如下:
127.0.0.1 localhost k8smaster

三十五、k8s 0/3 nodes are available: 3 node(s) didn’t have free ports for the requested pod ports、

原因:这是因为集群里部署了相同端口的服务。
解决方法:修改成没有部署过的端口即可。

三十六、swagger-ui.html 404 问题

解决方法

三十七、Class not found: io.kubernetes.client.openapi.models.V1Deployment

解释:https://issues.jenkins.io/browse/JENKINS-62995
解决方法:通过kubernetes cli 插件解决

三十八、vue框架下部署上线后刷新报404问题解决方案

解决方法

三十九、kubernetes下的jenkins如何设置maven settings

kubernetes下的jenkins如何设置maven settings

四十、私服与阿里云并存

maven私服与阿里云双服务器配置
【maven】配置多个仓库

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。