我正在使用traefik 2.2公开kubernetes v1.18集群中的kubernetes仪表板。这是我机器中的traefik IngressRoute配置:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: kubernetes-dashboard-route
namespace: default
spec:
entryPoints:
- websecure
routes:
- match: Host(`kubernete.dolphin.com`)
kind: Rule
services:
- name: kubernetes-dashboard
port: 443
traefik使用主机网络:true配置并监听主机的8000和8443端口。当我在集群中使用服务ip访问kubernetes仪表板时,它显示如下:
[root@k8smaster ~]# curl -k https://10.20.57.188:443
<!--
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kubernetes Dashboard</title>
<link rel="icon"
type="image/png"
href="assets/images/kubernetes-logo.png" />
<meta name="viewport"
content="width=device-width">
<link rel="stylesheet" href="styles.988f26601cdcb14da469.css"></head>
<body>
<kd-root></kd-root>
<script src="runtime.ddfec48137b0abfd678a.js" defer></script><script src="polyfills-es5.d57fe778f4588e63cc5c.js" nomodule defer></script><script src="polyfills.49104fe38e0ae7955ebb.js" defer></script><script src="scripts.391d299173602e261418.js" defer></script><script src="main.b94e335c0d02b12e3a7b.js" defer></script></body>
</html>
它告诉我kubernetes仪表板工作正常。但当我从本地机器访问kubernetes仪表板时:
[root@k8smaster ~]# curl -k --header 'Host:kubernete.dolphin.com' https://192.168.31.30:8443
404 page not found
我应该怎么做才能成功?我正在使用以下命令安装traefik:
helm install traefik traefik/traefik
没有错误日志:
我正在本地实验环境中部署kubernetes,因此在traefik中禁用TLS检查修复此问题,在traefik中添加配置:
containers:
- name: traefik
args:
- '--serversTransport.insecureSkipVerify=true'
然后使用它来检查是否成功:
[root@k8smaster ~]# curl -k --header "Host: kubernetes.dolphin.com" http://192.168.31.30:8443
<!--
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kubernetes Dashboard</title>
<link rel="icon"
type="image/png"
href="assets/images/kubernetes-logo.png" />
<meta name="viewport"
content="width=device-width">
<link rel="stylesheet" href="styles.988f26601cdcb14da469.css"></head>
<body>
<kd-root></kd-root>
<script src="runtime.ddfec48137b0abfd678a.js" defer></script><script src="polyfills-es5.d57fe778f4588e63cc5c.js" nomodule defer></script><script src="polyfills.49104fe38e0ae7955ebb.js" defer></script><script src="scripts.391d299173602e261418.js" defer></script><script src="main.b94e335c0d02b12e3a7b.js" defer></script></body>
</html>
我已经使用中间件创建了路由组。它工作得很好。 但我有一个问题,如果我把url导航到 http://localhost/laravel-news/public/admin/add-post-new 这没有登录,然后它重定向到客人主页 但如果我把url导航到 http://localhost/laravel-news/public/add-post-new 如果url中没有管理员,则返回空白页。现在我
问题内容: 我得到的是一个错误的说法 这是文件内的代码 这是我收到的控制台消息(加上3次刷新页面的尝试): 关于可能出什么问题的任何建议? 问题答案: 你太早了: 这是在你的任何路由被注册之前执行的。将这两行到结束你的文件。 接下来,你输入的第一行不正确: 没有功能;应该这样。
我指的是一个问题,已经被问了很多次,但其他地方发布的解决方案没有解决我的问题ie Socket.io.js找不到。 错误消息为 获取http://127.0.0.1:3000/socket.io/socket.io.js 404 一些附加信息:在我的app.js中:我引用了服务器套接字 '/javascripts/sockets/client.js'是我的客户端套接字:
我已将 LWJGL 安装到 Java 项目中,但无法导入 Display 类。 给出无法解决的错误。 DisplayMode和其他类也丢失。我在broswer里找不到他们。
尝试在K8s中启动rabbitmq,同时附加configmap时会出现以下错误: 以下是我的部署中的一个片段: 配置如下:
我有以下错误 未找到页面(404)请求方法:GET请求URL:http://127.0.0.1:8000/使用Decoder.urls中定义的URLconf,Django尝试了这些URL模式,顺序如下:form.html[name='form1']hl7[name='hl7']空路径与这些都不匹配。您会看到这个错误,因为您的Django设置文件中有DEBUG=True。将其更改为False,Dja