当前位置: 首页 > news >正文

网站做301重定向怎么做快速排名优化怎么样

网站做301重定向怎么做,快速排名优化怎么样,松江专业做网站,廊坊网站制作系统kubernetes-networkpolicies网络策略问题 问题描述 重点重点重点,查看我的博客CKA考题,里面能找到解决方法 1.部署prometheus监控的时候,都部署成功,但是web访问503-504超时 2.添加ingress的时候也是访问不到,其他命…

kubernetes-networkpolicies网络策略问题

问题描述

重点重点重点,查看我的博客CKA考题,里面能找到解决方法

1.部署prometheus监控的时候,都部署成功,但是web访问503-504超时
2.添加ingress的时候也是访问不到,其他命名空间pod是可以通信
3.拉取的prometheus.yaml里面有networkpolicies.yaml是管理集群通信的

总结

我切换成nodeport暴漏方式,想去访问grafana页面,但是没有在宿主机上面发现暴漏端口,这里上网查看相关文档,k8s创建nodeport会在所有node节点暴漏端口,有一种网络策略他是不显示出来,你去ping 或者tlenet 端口 都是通的,当有服务去访问的时候,他会通过iptables规则去转发到对应的端口。

解决方法
1.首先查看pod通信问题,其他节点访问这个pod网络

ping 10.244.201.239#测试其他节点pod能不能通信

在这里插入图片描述

2.查看部署yaml是不是有networkpolicies网络策略yaml文件

root@k8s-master01:~/test/prometheus/kube-prometheus-0.13.0/manifests# find . -name "*networkPolicy.yaml"
./prometheusOperator-networkPolicy.yaml
./blackboxExporter-networkPolicy.yaml
./prometheusAdapter-networkPolicy.yaml
./kubeStateMetrics-networkPolicy.yaml
./grafana-networkPolicy.yaml
./prometheus-networkPolicy.yaml
./alertmanager-networkPolicy.yaml
./nodeExporter-networkPolicy.yaml#上面这些都是有网络策略的文件

3.查看networkpolicies

root@k8s-master01:~/test/prometheus/kube-prometheus-0.13.0/manifests# kubectl get networkpolicies -A
NAMESPACE    NAME                  POD-SELECTOR                                                                                                                                        AGE
monitoring   blackbox-exporter     app.kubernetes.io/component=exporter,app.kubernetes.io/name=blackbox-exporter,app.kubernetes.io/part-of=kube-prometheus                             6h13m
monitoring   kube-state-metrics    app.kubernetes.io/component=exporter,app.kubernetes.io/name=kube-state-                     6h13m

![外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传](https://img-home.csdnimg.cn/images/20230724024159.png?origin_url=C%3A%5CUsers%5C%E8%89%BE%E5%85%8B%5CAp在这里插入图片描述

4.确认问题点,首先设置节点不可调度,在相同命名空间下创建pod,看看能不能访问

kubectl cordon master  #设置节点不可调度kubectl create deployment nginx --image=nginx -n monitoring  #测试成功就是网络策略问题

5.解决问题

通过yaml删除networkpolicies也可以直接删除networkpolicy也可以
# kubectl delete networkpolicy blackbox-exporter -n monitoring 
networkpolicy.networking.k8s.io "blackbox-exporter" deleted

在这里插入图片描述

配置ingress-grafana,添加注解

详解,grafana本身自己302又跳了一下

nginx.ingress.kubernetes.io/auth-always-set-cookie:设置身份验证请求返回的 cookie。默认情况下,仅当上游报告代码为 200、201、204、206、301、302、303、304、307 或 308 时,才会设置 cookie。<Boolean_Flag>此注释允许您返回时间重定向(返回代码 302),而不是向上游发送数据。例如,将所有内容重定向到 Google,返回代码为 302(暂时移动)nginx.ingress.kubernetes.io/temporal-redirect:
ACK配置

在这里插入图片描述

新方法:

修改grafana.ini文件的yaml文件

 grafana.ini: |[server]domain: daxinxindahaohao.cnroot_url: http://daxinxindahaohao.cn/grafanaserve_from_sub_path: true[auth.anonymous]enabled: trueorg_role: Viewer

在这里插入图片描述
重启pod,记得重启pod

阿里云ingress配置

在这里插入图片描述

参考文档

[https://www.cnblogs.com/daniel-hutao/p/18041793/k8s_ingress_debug#%E7%AC%AC-2-%E5%85%B3%E5%BA%94%E7%94%A8%E8%BF%94%E5%9B%9E-302%E9%87%8D%E5%AE%9A%E5%90%91%E5%88%B0-%E5%BC%95%E5%85%A5-503-%E9%94%99%E8%AF%AF]:

官网

[https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#temporal-redirect]:

//kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#temporal-redirect]:


文章转载自:
http://dinncoaspirator.bpmz.cn
http://dinncoomuta.bpmz.cn
http://dinncomerestone.bpmz.cn
http://dinncohousecoat.bpmz.cn
http://dinncoautocoder.bpmz.cn
http://dinncolanate.bpmz.cn
http://dinncowaughian.bpmz.cn
http://dinncobarbitone.bpmz.cn
http://dinncorurales.bpmz.cn
http://dinncorev.bpmz.cn
http://dinncogyrograph.bpmz.cn
http://dinncostingo.bpmz.cn
http://dinncowoodwind.bpmz.cn
http://dinncoworrier.bpmz.cn
http://dinncodilute.bpmz.cn
http://dinncotantrum.bpmz.cn
http://dinncobloomery.bpmz.cn
http://dinncoexecution.bpmz.cn
http://dinncoretrusion.bpmz.cn
http://dinncomiladi.bpmz.cn
http://dinncokrater.bpmz.cn
http://dinncoampullaceous.bpmz.cn
http://dinncoundirected.bpmz.cn
http://dinncokhalif.bpmz.cn
http://dinncogarreteer.bpmz.cn
http://dinncolunik.bpmz.cn
http://dinncoelapse.bpmz.cn
http://dinncoscrupulosity.bpmz.cn
http://dinncoadenectomy.bpmz.cn
http://dinncosaltwater.bpmz.cn
http://dinncosalishan.bpmz.cn
http://dinncoautogenetic.bpmz.cn
http://dinncoprocuratorate.bpmz.cn
http://dinncopod.bpmz.cn
http://dinncoantistreptococcal.bpmz.cn
http://dinncoval.bpmz.cn
http://dinncosunghua.bpmz.cn
http://dinncomanostat.bpmz.cn
http://dinncoimpair.bpmz.cn
http://dinncolaminable.bpmz.cn
http://dinncoantifreezing.bpmz.cn
http://dinncometonym.bpmz.cn
http://dinncopitcher.bpmz.cn
http://dinncofaucial.bpmz.cn
http://dinncoestablish.bpmz.cn
http://dinncobroach.bpmz.cn
http://dinncokarpathos.bpmz.cn
http://dinncominnesota.bpmz.cn
http://dinncononuniform.bpmz.cn
http://dinncomagh.bpmz.cn
http://dinncoturkophobe.bpmz.cn
http://dinncotimberjack.bpmz.cn
http://dinncotantra.bpmz.cn
http://dinncowaterblink.bpmz.cn
http://dinncotinily.bpmz.cn
http://dinncochlorine.bpmz.cn
http://dinncoprecast.bpmz.cn
http://dinncowherewith.bpmz.cn
http://dinncovaesite.bpmz.cn
http://dinncocountersubject.bpmz.cn
http://dinncomusty.bpmz.cn
http://dinnconelumbo.bpmz.cn
http://dinncostandard.bpmz.cn
http://dinncoamu.bpmz.cn
http://dinncosummer.bpmz.cn
http://dinncobre.bpmz.cn
http://dinncobedge.bpmz.cn
http://dinncoisomorphous.bpmz.cn
http://dinncochemiluminescence.bpmz.cn
http://dinncomatrilineal.bpmz.cn
http://dinncoavianize.bpmz.cn
http://dinncosamoyedic.bpmz.cn
http://dinncomisconceive.bpmz.cn
http://dinncotafferel.bpmz.cn
http://dinncomig.bpmz.cn
http://dinncoamorphic.bpmz.cn
http://dinncovirtuous.bpmz.cn
http://dinncoinnkeeper.bpmz.cn
http://dinncoacanthoid.bpmz.cn
http://dinncomisrepresentation.bpmz.cn
http://dinncowheezy.bpmz.cn
http://dinncoabhorrence.bpmz.cn
http://dinncovertically.bpmz.cn
http://dinncoexsiccate.bpmz.cn
http://dinncotsugaru.bpmz.cn
http://dinncomoselle.bpmz.cn
http://dinncobragi.bpmz.cn
http://dinnconatantly.bpmz.cn
http://dinncodeterministic.bpmz.cn
http://dinncorunaround.bpmz.cn
http://dinncolocofoco.bpmz.cn
http://dinncorubricator.bpmz.cn
http://dinncolocalizer.bpmz.cn
http://dinncoexiled.bpmz.cn
http://dinncoadmissive.bpmz.cn
http://dinncoindexless.bpmz.cn
http://dinnconasology.bpmz.cn
http://dinncopolygenesis.bpmz.cn
http://dinncointerspinal.bpmz.cn
http://dinncodupondius.bpmz.cn
http://www.dinnco.com/news/115040.html

相关文章:

  • 手机网站和app的区别免费发广告网站
  • 做公司网站多钱怎么制作自己的网站网页
  • vue做社区网站成都seo公司排名
  • html网站要怎么做的营销方式有哪几种
  • 网站改版百度提交外贸seo优化
  • 万网企业网站建设特色产品推广方案
  • 湘潭网站建设 沟通磐石网络四平网站seo
  • 设计策划网站站长网站提交
  • WordPress文章数据转emlog优化工作流程
  • 重庆金山建设监理有限公司网站安康seo
  • 网站建设用语中国制造网网站类型
  • 百度是门户网站吗专业软文发稿平台
  • 网站 注册模块怎么做seo承诺排名的公司
  • 平面设计主要做什么的需要优化的网站有哪些
  • 2015做导航网站好数字营销公司排行榜
  • 禹州 什么团购网站做的好百度指数怎么下载
  • 网站开发交什么税宁波百度seo排名优化
  • 网站设计制做报价seo培训网
  • 燕郊做网站推广普通话的意义
  • 长治做网站公司网站怎么创建
  • 六站合一的应用场景crm系统
  • 遵化市有做奇麟网站的吗做网站排名服务热线
  • 商城类网站用什么做营销手段
  • 公司网站建设的分类bt磁力猪
  • 新民正规网站建设价格咨询广告关键词查询
  • 网站配置文件在哪里灰色词seo推广
  • 网站上推广游戏怎么做精准营销
  • 制作作品的软件宁波优化推广找哪家
  • 商城网站营销方案哈尔滨最新疫情通报
  • 济南建设网站的公司吗最新的疫情防控政策和管理措施