my-dlq / blog-example Goto Github PK
View Code? Open in Web Editor NEW博客中的示例文件,包含 Kubernetes、Jenkins、Go、Java、SpringBoot、SpringCloud 知识示例等,将结合博客逐步讲解整体的知识内容体系。
Home Page: http://www.mydlq.club
博客中的示例文件,包含 Kubernetes、Jenkins、Go、Java、SpringBoot、SpringCloud 知识示例等,将结合博客逐步讲解整体的知识内容体系。
Home Page: http://www.mydlq.club
你好,感谢你的博客,我在部署prometheus的过程,一直提示“CrashLoopBackoff”,细心检查了一遍,也没有发现那里配置有误。麻烦帮忙。感谢!
prometheus-6479c8888f-hprf8 1/2 CrashLoopBackOff 8 18m 172.30.2.14 10.9.143.246
error: a container name must be specified for pod prometheus-6479c8888f-hprf8, choose one of: [prometheus configmap-reload]
。。。。
Events:
Type Reason Age From Message
Normal Scheduled 18m default-scheduler Successfully assigned kube-system/prometheus-6479c8888f-hprf8 to 10.9.143.246
Normal Pulled 18m kubelet Container image "jimmidyson/configmap-reload:v0.5.0" already present on machine
Normal Created 18m kubelet Created container configmap-reload
Normal Started 18m kubelet Started container configmap-reload
Normal Created 17m (x4 over 18m) kubelet Created container prometheus
Normal Started 17m (x4 over 18m) kubelet Started container prometheus
Normal Pulled 17m (x5 over 18m) kubelet Container image "prom/prometheus:v2.26.0" already present on machine
Warning BackOff 3m34s (x76 over 18m) kubelet Back-off restarting failed container
直接使用你的文件
{"ingress":"traefik-dashboard-route","level":"error","msg":"Cannot create service: subset not found","namespace":"kube-system","providerName":"kubernetescrd","serviceName":"traefik","servicePort":8080,"time":"2019-12-02T05:55:35Z"}
访问http://192.168.199.139:32053/instance?name=default
错误内容如下:
Failure executing: GET at: https://10.96.0.1/api/v1/namespaces/default/endpoints/default. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. endpoints "default" is forbidden: User "system:serviceaccount:default:default" cannot get resource "endpoints" in API group "" in the namespace "default".
你好,很荣幸能看到这个项目以及相关的文章。
通过这个YAML部署后,traefik成功部署,但是https却无法成功访问,返回403,请教一下是什么问题。
接下来我具体描述一下我的部署过程。
最开始我并没有看到这个项目,我就直接通过Helm部署了,相关命令如下:
helm repo add traefik https://helm.traefik.io/traefik
helm repo update
kubectl create ns traefik
helm install traefik traefik/traefik -n traefik
kubectl apply -f traefik/route.yaml
其中 traefik/route.yaml
如下:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
namespace: traefik
spec:
entryPoints:
- web
routes:
- match: Host(`traefik.dashboard.com`)
kind: Rule
services:
- name: api@internal
kind: TraefikService
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard-tls
namespace: traefik
spec:
entryPoints:
- websecure
routes:
- match: Host(`traefik.dashboard.com`)
kind: Rule
services:
- name: api@internal
kind: TraefikService
tls:
secretName: traefik-dashboard-tls
其中 traefik-dashboard-tls
为我的自签证书:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=traefik.dashboard.com"
kubectl create secret tls traefik-dashboard-tls --key tls.key --cert tls.crt -n traefik
但是访问时,通过http能够正常访问,而https返回403.
效果如下:
然后我直接将chart下下来,看了一圈,也没看出个头绪,于是就在网上查询解决方案,很幸运找到这个项目以及对应文章。
我就按照文章中的步骤,一步一步创建YAML并部署。
当然,首先是干掉之前的那个命名空间:
kubectl delete ns traefik
然后按照文章,一步一步地创建文件,同时部署:
我只修改了一个地方,就是 Service 中的 type:
apiVersion: v1
kind: Service
metadata:
name: traefik
spec:
ports:
- name: web
port: 80
- name: websecure
port: 443
- name: admin
port: 8080
type: LoadBalancer
selector:
app: traefik
最终,应用成功部署:
但是,通过http访问没问题,https仍然返回403,排查了半天,还是不知道原因。
请问下阁下,有没有什么解决方案,或者一些好的排查方法。望不吝赐教,感激不尽。
1,http://www.mydlq.club/article/31/ 文章中提到的service-rbac.yaml 没有找到。是否不需要了?
2,service-feign-interface 编译之后好像也没用到,是否不需要呢?
3,service-provider已经启动了,但是访问service-customer 还是提示fallback!。请问如何排查呢
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "services \"https:kubernetes-dashboard:\" is forbidden: User \"system:anonymous\" cannot get resource \"services/proxy\" in API group \"\" in the namespace \"kube-system\"",
"reason": "Forbidden",
"details": {
"name": "https:kubernetes-dashboard:",
"kind": "services"
},
"code": 403
}
kubectl apply -f k8s-dashboard-rbac.yaml
kubectl apply -f k8s-dashboard-configmap-secret.yaml
kubectl apply -f k8s-dashboard-deploy.yaml
kubectl apply -f kubernetes-metrics-scraper.yaml
kubectl apply -f k8s-dashboard-token.yaml
I run these script.
参考博主这篇文章 http://www.mydlq.club/article/84/ 的步骤,但没有成功生成 kafka mq 消息
目前ES的最新版本已经到7.6了,博主能否将例子升级下呢,不胜感谢!
提示错误:28 Operation timed out after 15000 milliseconds with 1981044 out of 11202026 bytes received
其他站点的rss可以正常订阅,不知道是否需要什么特殊配置?
您好,我也是一名后端开发人员,看了您的博客,受益匪浅,想像您请教一下您的博客平台是如何搭建的,我也想维护一个,需要您给指导一下,谢谢!
通过配置自动跳转,使http自动跳转至https,请问UP主如何操作
当你创建job的时候,如果script里面包含一些&,<等特殊符号的时候,调用API后台会出现报错信息。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.