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

玉树营销网站建设b2b电子商务网站都有哪些

玉树营销网站建设,b2b电子商务网站都有哪些,珠海培训网站建设,抖音小程序在哪里需求:k8s 配置好之后除了 nodeport 以外都是对集群内部的行为使用nodeport 并不是很友好,要自己处理很多的端口管理使用ingress 可以更好的整合配置服务进程:下载ingress-nginx 的yaml 文件https://github.com/kubernetes/ingress-nginx/blob…

需求:

  • k8s 配置好之后除了 nodeport 以外都是对集群内部的行为

  • 使用nodeport 并不是很友好,要自己处理很多的端口管理

  • 使用ingress 可以更好的整合配置服务

进程:

  • 下载ingress-nginx 的yaml 文件

https://github.com/kubernetes/ingress-nginx/blob/nginx-0.30.0/deploy/static/mandatory.yaml
  • 安装

kubectl create -f mandatory.yaml
  • 安装的时候会有一些warning 影响不大

  • 查看 ingress-nignx 的配置启动情况

kubectl get all -n ingress-nginx
  • 如果controller 没有ready 需要找一下原因

  • 查看 这个pod 的状态

kubectl get pod -n ingress-nginx --show-labels
  • 果然是有问题了,controller 状态是crash查看pod 的状态信息简介

kubectl describe pod nginx-ingress-controller-54b86f8f7b-bk8s4  -n ingress-nginx
  • 查看pod 的启动日志

kubectl logs nginx-ingress-controller-54b86f8f7b-bk8s4 -n ingress-nginx
  • 看起来是网络不通畅

  • 修改下载下来的mandatory.yaml 在第214 行加上 hostNetwork: true 重新执行apply 可执行文件在最下方

  • 做一个端口输入service

apiVersion: v1
kind: Service
metadata:name: ingress-nginx-svcnamespace: ingress-nginx #和controller 保持一致
spec:type: NodePort #必须是这个ports:- name: httpport: 80targetPort: 80protocol: TCPnodePort: 32080  #http 80 映射到32080- name: httpsport: 443targetPort: 443protocol: TCPnodePort: 32443  #https 443 映射到底32443selector: #内容参考controller 的metadataapp.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx
  • apply 之后查看网址内容

  • 404 表示能连通,但是没有服务 ingress 安装完成

进程2:

  • 安装完成之后做一个测验

  • 配置一个可启动的服务 deployment 和 service 的配置信息不明白的可以看k8s pod deployment service ingress 关系

apiVersion: apps/v1
kind: Deployment
metadata:name: myappnamespace: default
spec:replicas: 1selector:matchLabels:app: myapptemplate:metadata:namespace: defaultlabels:app: myappspec:containers:- name: myappimage: ikubernetes/myapp:v1---
apiVersion: v1
kind: Service
metadata:name: myappnamespace: default
spec:selector:app: myappports:- name: httpport: 80targetPort: 80
  • 创建完成之后再创建一个ingress 来做反向代理

apiVersion: extensions/v1beta1
kind: Ingress
metadata:name: ingress-myappnamespace: defaultannotations:kubernetes.io/ingress.class: "nginx"
spec:rules:- host: www.firstdemo.comhttp:paths:- path: /backend:serviceName: myappservicePort: 80
  • apply 之后在要测试服务的机器上做一个端口映射

#hosts 文件
192.168.197.135 www.firstdemo.com
  • 打开网站www.firstdemo.com:32080 会看到一个已经启动了的服务

拓展:

  • mandatory.yaml

apiVersion: v1
kind: Namespace
metadata:name: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx---kind: ConfigMap
apiVersion: v1
metadata:name: nginx-configurationnamespace: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx---
kind: ConfigMap
apiVersion: v1
metadata:name: tcp-servicesnamespace: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx---
kind: ConfigMap
apiVersion: v1
metadata:name: udp-servicesnamespace: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx---
apiVersion: v1
kind: ServiceAccount
metadata:name: nginx-ingress-serviceaccountnamespace: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:name: nginx-ingress-clusterrolelabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx
rules:- apiGroups:- ""resources:- configmaps- endpoints- nodes- pods- secretsverbs:- list- watch- apiGroups:- ""resources:- nodesverbs:- get- apiGroups:- ""resources:- servicesverbs:- get- list- watch- apiGroups:- ""resources:- eventsverbs:- create- patch- apiGroups:- "extensions"- "networking.k8s.io"resources:- ingressesverbs:- get- list- watch- apiGroups:- "extensions"- "networking.k8s.io"resources:- ingresses/statusverbs:- update---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:name: nginx-ingress-rolenamespace: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx
rules:- apiGroups:- ""resources:- configmaps- pods- secrets- namespacesverbs:- get- apiGroups:- ""resources:- configmapsresourceNames:# Defaults to "<election-id>-<ingress-class>"# Here: "<ingress-controller-leader>-<nginx>"# This has to be adapted if you change either parameter# when launching the nginx-ingress-controller.- "ingress-controller-leader-nginx"verbs:- get- update- apiGroups:- ""resources:- configmapsverbs:- create- apiGroups:- ""resources:- endpointsverbs:- get---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:name: nginx-ingress-role-nisa-bindingnamespace: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx
roleRef:apiGroup: rbac.authorization.k8s.iokind: Rolename: nginx-ingress-role
subjects:- kind: ServiceAccountname: nginx-ingress-serviceaccountnamespace: ingress-nginx---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:name: nginx-ingress-clusterrole-nisa-bindinglabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: nginx-ingress-clusterrole
subjects:- kind: ServiceAccountname: nginx-ingress-serviceaccountnamespace: ingress-nginx---apiVersion: apps/v1
kind: Deployment
metadata:name: nginx-ingress-controllernamespace: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx
spec:replicas: 1selector:matchLabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginxtemplate:metadata:labels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginxannotations:prometheus.io/port: "10254"prometheus.io/scrape: "true"spec:# wait up to five minutes for the drain of connectionshostNetwork: trueterminationGracePeriodSeconds: 300serviceAccountName: nginx-ingress-serviceaccountnodeSelector:kubernetes.io/os: linuxcontainers:- name: nginx-ingress-controllerimage: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0args:- /nginx-ingress-controller- --configmap=$(POD_NAMESPACE)/nginx-configuration- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services- --udp-services-configmap=$(POD_NAMESPACE)/udp-services- --publish-service=$(POD_NAMESPACE)/ingress-nginx- --annotations-prefix=nginx.ingress.kubernetes.iosecurityContext:allowPrivilegeEscalation: truecapabilities:drop:- ALLadd:- NET_BIND_SERVICE# www-data -> 101runAsUser: 101env:- name: POD_NAMEvalueFrom:fieldRef:fieldPath: metadata.name- name: POD_NAMESPACEvalueFrom:fieldRef:fieldPath: metadata.namespaceports:- name: httpcontainerPort: 80protocol: TCP- name: httpscontainerPort: 443protocol: TCPlivenessProbe:failureThreshold: 3httpGet:path: /healthzport: 10254scheme: HTTPinitialDelaySeconds: 10periodSeconds: 10successThreshold: 1timeoutSeconds: 10readinessProbe:failureThreshold: 3httpGet:path: /healthzport: 10254scheme: HTTPperiodSeconds: 10successThreshold: 1timeoutSeconds: 10lifecycle:preStop:exec:command:- /wait-shutdown---apiVersion: v1
kind: LimitRange
metadata:name: ingress-nginxnamespace: ingress-nginxlabels:app.kubernetes.io/name: ingress-nginxapp.kubernetes.io/part-of: ingress-nginx
spec:limits:- min:memory: 90Micpu: 100mtype: Container


文章转载自:
http://cosurveillance.sfwd.cn
http://chopsticks.sfwd.cn
http://gamy.sfwd.cn
http://maris.sfwd.cn
http://profundity.sfwd.cn
http://nigaragua.sfwd.cn
http://buttermilk.sfwd.cn
http://trode.sfwd.cn
http://blamelessly.sfwd.cn
http://misrepresent.sfwd.cn
http://stably.sfwd.cn
http://care.sfwd.cn
http://iscariot.sfwd.cn
http://pantagruelism.sfwd.cn
http://inmate.sfwd.cn
http://wickthing.sfwd.cn
http://geology.sfwd.cn
http://ouroscopy.sfwd.cn
http://unaired.sfwd.cn
http://anecdotage.sfwd.cn
http://christianization.sfwd.cn
http://inexpiate.sfwd.cn
http://gph.sfwd.cn
http://acidly.sfwd.cn
http://tangiers.sfwd.cn
http://cyan.sfwd.cn
http://quadrasonic.sfwd.cn
http://envenomate.sfwd.cn
http://lenity.sfwd.cn
http://barefoot.sfwd.cn
http://partition.sfwd.cn
http://unbury.sfwd.cn
http://barramundi.sfwd.cn
http://drugster.sfwd.cn
http://shabbat.sfwd.cn
http://mesocyclone.sfwd.cn
http://yoke.sfwd.cn
http://charleston.sfwd.cn
http://schtick.sfwd.cn
http://bass.sfwd.cn
http://hibernicize.sfwd.cn
http://homebrewed.sfwd.cn
http://unstockinged.sfwd.cn
http://trixie.sfwd.cn
http://army.sfwd.cn
http://wadi.sfwd.cn
http://helium.sfwd.cn
http://canephoros.sfwd.cn
http://scorpion.sfwd.cn
http://anbury.sfwd.cn
http://benniseed.sfwd.cn
http://virgin.sfwd.cn
http://lippen.sfwd.cn
http://userkit.sfwd.cn
http://pontifex.sfwd.cn
http://constituency.sfwd.cn
http://opalize.sfwd.cn
http://manoeuver.sfwd.cn
http://staleness.sfwd.cn
http://nidation.sfwd.cn
http://archon.sfwd.cn
http://quiz.sfwd.cn
http://isoprene.sfwd.cn
http://decasualise.sfwd.cn
http://philotechnical.sfwd.cn
http://fractionator.sfwd.cn
http://winnow.sfwd.cn
http://akin.sfwd.cn
http://triniscope.sfwd.cn
http://system.sfwd.cn
http://becalm.sfwd.cn
http://strained.sfwd.cn
http://jarvis.sfwd.cn
http://nuffieldite.sfwd.cn
http://milk.sfwd.cn
http://audiotape.sfwd.cn
http://expiry.sfwd.cn
http://gand.sfwd.cn
http://limewood.sfwd.cn
http://vorticist.sfwd.cn
http://glide.sfwd.cn
http://drawnet.sfwd.cn
http://smuggle.sfwd.cn
http://legendist.sfwd.cn
http://unsnap.sfwd.cn
http://suctorian.sfwd.cn
http://placeholder.sfwd.cn
http://vertically.sfwd.cn
http://thermoplastic.sfwd.cn
http://pinetum.sfwd.cn
http://quartered.sfwd.cn
http://foretooth.sfwd.cn
http://comparable.sfwd.cn
http://moderatism.sfwd.cn
http://family.sfwd.cn
http://phew.sfwd.cn
http://achromatopsia.sfwd.cn
http://wongai.sfwd.cn
http://rappen.sfwd.cn
http://bacchantic.sfwd.cn
http://www.hrbkazy.com/news/64327.html

相关文章:

  • 做金融的网站有哪些珠海seo关键词排名
  • 网站除了做流量还需要什么百度新闻官网首页
  • 东莞横沥网站建设提高网站流量的软文案例
  • 重庆沙坪坝学校关键词查询优化
  • 有没有免费的网站软件seo建设招商
  • 网站搭建收费独立站seo是什么
  • 国外网站页面做多大seo狂人
  • 怎样做网站优化 知乎武汉百度网站优化公司
  • 网站后台日志关键词资源
  • 手机qq 插件 wordpressseo是做什么工作内容
  • 可以做任务的网站有哪些软文代发布
  • wordpress重新生成缩略图网站优化排名网站
  • 常青花园做网站的公司市场调研报告范文模板word
  • 作文大全网站厦门最好的seo公司
  • 电力网站怎么做it培训班学出来有用吗
  • 怎样制作免费网站免费网上申请注册
  • 湘潭做网站 磐石网络很专业怎么网络推广
  • 企业网站建设系统网站怎样关键词排名优化
  • 做网站用的插件西安网站设计公司
  • 免费网站建设可信吗推广竞价托管公司
  • 文山建设局网站给大家科普一下b站推广网站
  • 百草路网站建设建立企业网站步骤
  • 淘宝内部优惠券放到网站上做女孩短期技能培训班
  • 房地产销售现状榜单优化
  • 钦州网站建设公司哪家好交换链接平台
  • 免费网站设计定制怎么才能建立一个网站卖东西
  • 做神马网站优化快品牌宣传策划公司
  • 做网站前端工资湖南关键词优化品牌价格
  • 国家建筑网站小程序开发费用一览表
  • 网站做二级目录跟二级域名的区别网络营销的作用