91视频专区

《妈妈的朋友韩国在线观看》高清不卡在线观看 - 全集...

7月8日,经视直播记者联系上视频拍摄者王先生,王先生告诉记者,7月7日晚,自己和朋友来到位于徐东的小民大排档宵夜,点了一份韭菜螺蛳肉。由于自己平时喜欢钓鱼,见过福寿螺,他感觉菜里的螺肉可能是福寿螺肉,“平常在外面钓鱼经常遇到福寿螺卵,然后包括福寿螺有四只触角,我也是知道的。”王先生还说,这盘螺肉个头都很大,不是一只两只,“田螺的区别是个头比较小,炒出来几乎是没有什么肉的。”

2024年12月24日,对于轮胎补多少次就不能上高速了,我帮大家查了很多资料,实际上每一个牌子的轮胎能补多少次,他们都是有技术说明的。有些轮胎最多只能补一次,比如的邓绿普、美国的固特异、意大利倍耐力等。但日本的普利司通、韩国镜湖这些却说刻意补2次,不过2个补丁之间的距离不能小于41厘米。我相信很多人看到这基本上就开始担心了,因为大多数人的轮胎都是邓绿普或者普利司通的,但大多数人开车过程中不可能只补一次或者两次胎就把轮胎丢掉了。到底这些轮胎还能不能安全跑高速?

《妈妈的朋友韩国在线观看》高清不卡在线观看 - 全集...

第84分钟科克曲抽筋下场

无论是自主品牌还是合资品牌,在2024年的北京车展上,我们都看到了各家车企在800痴高压快充领域的不懈努力。从纯电轿车、纯电厂鲍痴到纯电惭笔痴,产物线也日趋丰富多元,很好地满足了不同消费群体的需求。如,在嘉庆八年十月,嘉庆帝的恕妃、简嫔、逊嫔葬入了昌陵妃园寝后,此园寝称昌陵恕妃衙门。

2020nianquanguobengchuangjinbiaosainvzibengchuanggerendanxiangjuesai,linzuozuoyi56.525fenhuodeguanjun。11yue6ri,2020nianquanguobengchuangguanjunsainvzigerenjuesai,linzuozuoyi56.995fenhuodeguanjun。guanzhongduiwodeqidaizhikenengshiyaoxiangyibannazhongnvmingxing,A4yaohenxi,shoubiyaohenshou,renyaofeichangjingzhi。wojiujuede who cares,meigerenduimeidezhuiqiu、dingyibutong,zhanzailiujiaolianpangbiandebuxuyaoshi“pameila”,woduizijixianzaideyangzihenmanyi,henzixin。

——坚(闯颈补苍)定(顿颈苍驳)信(齿颈苍)心(齿颈苍),推(罢耻颈)动(顿辞苍驳)中(窜丑辞苍驳)国(骋耻辞)经(闯颈苍驳)济(闯颈)整(窜丑别苍驳)体(罢颈)好(贬补辞)转(窜丑耻补苍)④

xingxiangjulebuhuiyuanzaizhidingqudaomeileijiwanchengzhidingxiaofei50yuan,jiukeleiji1dianchengchangzhiyu1kehaolixingxing。shenlongxia,2023quanshuipiaoliutiyanquanxinshengji!2023-07-11 14:47·zhongguoqingnianwangsuizhuoshuqidaolai,lvyoushichangquanmianshengwen,“bishu“、“piaoliu”、“qinshui”chengweiliaozhongqingrenxiatiandegangxu,yerangzhongqingzhoubianzuiremendewanghongpiaoliudishenlongxiajingqureduchixupansheng。shenlongxiapingjiedetianduhoudehuanjingyoushi,bujinshizhongqingrendebishushengdi,yexiyinzhuolaiziquanguogedidelvyouaihaozhelaibishu、dengshan、qinshui、piaoliu。zuoweizhongqingzuizaodepiaoliudaozhiyi,“shengtaipiaoliu”shishenlongxiajingqudangzhiwukuidejinzizhaopai,qishuiyuanlaizijinfoshanshenchuqingchechunjing、bingshuangqinrendetianrankuangquan,zaijiashangpiaoliudaodiezuoqifuzaiqingcuishanguzhong,yuzhoubianmeijingxiangdeyizhang,yincishoudaowushuyoukedehaopingyuqingzuo。jinxia,2023nianshenlongxiaquanshuipiaoliutiyanquanxinshengji!zai“shengtaipiaoliu”tesejichushang,zengsheshuilian、shuiwu、shuilangdenghudongshuijingguan,rangxiaguzhongdequanshuipiaoliugengciji、gengqingliang、genglangman、gengmenghuan!7yue2ri,shenlongxiajingquteyao10weiwanghong“tiyanguan”ganshoujingxian、cijieryoulangmandepiaoliuxiangmu。qizhong,quanshuipiaoliuheshuijingguantesetiyanxiangjiehedeshengjiwanfa,rang“tiyanguan”menzhihuciji、guozuo!shenlongxiashiyitiaoyuanshishengtaixiagu,lizhongqingzhongxinchengqujin79gongli。lijingliaoshangyiniandikeyundong,shenlongxiazuizhongxingchengdianxingde“V”zixingshenqiexiagu,zheligaosongdeshanyuyoushendeguxiangduigaodukeda600miyishang。ruguocongkongzhongfushi,shenlongxiadaxiagujiuxiangshiyitiaohengwoshanjiandejulong,erqiexiaguneichuchuyouzhuoguanyulongdechuanshuo,yinerdemingshenlongxia。shenlongxiaquanshuipiaoliuxiangmu,shimuqianzhongqingdiquluochazuida、zuiciji、piaoliuzuijiqing、piaoliusuduzuikuaidexiagupiaoliu,zhelishanqingshuixiu,feipubuduan,shanfenggaosong,biliqianzuo,qishibangzuo,shibiyeyou、qinziyou、tuanduiyoudeshouxuan。dangtian,bansuizhuojieyadejinghunahan,“tiyanguanmen”depiaoliutingzaituanjideshuiliuzhongyanzhuopiaoliudaoyilukuangben。zuoyanquzhedeshenlongxiapiaoliudaoquanchang2.8gongli,zongluocha86mi,yongyouyongshipiao、huixuanpiao、zuoyaopiaodeng15gejingxiancijidepiaoliutiyanduan,zuidayichuda10mi。yilupiaoxia,diezuoqifu,langefeizhou,luochadailaidechaoqiangchongjiganheshizhongganrangrenshenshangxiansuzuosheng,jingxianyouciji!tuanjichushuiliuyibosanzhe,tingdaozhichulanghuafeiwu,gengshirangsuoyourendahuguozuo。zhideyitideshi,jinnian,#haoshuabuguoshenlongxia#2023nianshenlongxiaquanshuipiaoliujixiangguanwanfatiyanquanmianshengji,tixianchugengciji、gengqingliang、gengmenghuandetese。weiliaojinyibumanzugengduoyoukexiuxianfangsong、guanshangmeijing、hudongtiyandexuqiu,shenlongxiajingquzaipiaoliuyantuzengsheliao10yuchushuijingguantesetiyanxiangmu。tiyanguanmendechuanzhizaishuimianshiyinshixian,gezhong“jingxi”yeshiwuchubuzai。dangpiaoliuchuanxingzhihuanliuchu,zhelihedaokuanchangpingjing,weifengxuxu,shuiwumiman,xianqipiaopiao,zhishenqunzhonghuanbaozhongbeixianqizuorao,rumengsihuan,chengweizuoshuixunqudezuijiahuanjing。gouchengliao“renzaishuishangpiao,fangruohuazhongyou”dehuajuan,dayou“danyunliushuiducisheng”deyijing。ganggangchuanxingzaishuiwujian,dajiayourushenchuqitedeshuishijie,weimeilangman,menghuanmili。zhuanshunzhijian,piaoliuchuanchuanguoqiaodong,turanyinglaishuilianpensa,qingchegantiandequanshuirangrentouxinliang,xinfeiyang,quanmianshifangxiarijiqing。bujinruci,jingquhuanzaipiaoliudaokuankuochusheliliaochaodashuilang,shuiliuyiyongershangda10mizhigao,geirenzhenhandeshijueganshouhefeifandeqinshuitiyan。chuliaopiaoliutiyandeshengjiwai,jingqudengshanyouxianzhonghuanzengsheliaopubu、penquan、shuichidengkeqinshuidakajingguan,rangyoukedengshantuzhongtiyanbutongdefengqinghelequ。shenlongxiashengtaixiagufengjingruhua,bulunshipiaoliuhuanshiguanguangyouwandushizhongqingzhoubianxiaribishujiadi。shengxiayizhi,xiangyuehaoyou、jiarenyumeilideshenlongxiajiqingpiaoliu,siyiwanshui、jinqingxiangshoushuizhongkuanghuan,dayigeqingliang,zheyangdexiaritiyanjianzhishushuang!wenzuotishi:chengcheluxian:zhongqingsigonglishuniuzhan—nanchuankeyunzhongxin—nanchuankeyunxizhan—nanpingchezhan—shenlongxiafengjingquzijialuxian:zhongqingneihuan—yuxianggaosu(G65)—nanwangaosu—nanpingxiadao—shenlongxiafengjingqu(laiyuan:zhongguoribaowang)

首(Shou)发(Fa)2024-03-29 13:11·大(Da)众(Zhong)风(Feng)华(Hua)

2024-07-05 13:17·中国铁路这也是西宁被称为“中国夏都”的最直接的原因。《妈妈的朋友韩国在线观看》高清不卡在线观看 - 全集...

开发和运维对K8S中的应用都做了什么2022-05-19 08:50·运维开发故事在应用的整个生命周期里开发和运维都和它密不可分一个塑造它一个保养它如果应用需要部署到K8S中开发和运维在其中都做了什么呢开发侧从开发侧来说我们的应用应该具备以下能力:具有健康检测接口具有优雅退出能力具有metrics接口能够接入链路追踪系统日志输出标准统一定义健康检测接口健康检测接口用于检测应用的健康状态在K8S中使用Readiness和Liveness分别来探测应用是否就绪和是否存活如果未就绪或者未存活K8S会采取相应的措施来确保应用可用如果我们应用未定义好相应的健康检测接口K8S就无法判断应用是否正常可用整个应用对我们来说就是黑匣子也就谈不上应用稳定性了定义一个简单的健康检测接口如下:package routerimport ("github.com/gin-gonic/gin" v1 "go-hello-world/app/http/controllers/v1")func SetupRouter(router *gin.Engine) { ruc := new(v1.RootController) router.GET("/", ruc.Root) huc := new(v1.HealthController) router.GET("/health", huc.HealthCheck)}package v1import ("github.com/gin-gonic/gin""go-hello-world/app/http/controllers""go-hello-world/pkg/response""net/http")type HealthController struct { controllers.BaseController}func (h *HealthController) HealthCheck(c *gin.Context) { response.WriteResponse(c, http.StatusOK, nil, gin.H{"result": "健康检测页面","status": "OK", })}如上我们定义了health接口当应用启动后只需要探测这个接口如果返回OK表示应用是正常的当然上面的接口是非常简单的在实际情况下应用本身也许还依赖起来应用比如redismysqlmq等如果它们异常应用是不是异常的呢那我们的应用健康检测需不需要检测其他应用的健康状态呢既然我们定义好了健康检测接口那我们的YAML模板就可以增加健康检测功能如下:readinessProbe:httpGet:path: /healthport: httptimeoutSeconds: 3initialDelaySeconds: 20livenessProbe:httpGet:path: /healthport: httptimeoutSeconds: 3initialDelaySeconds: 30定义优雅下线功能应用发版是常规不能再常规的操作通常情况下都是滚动更新的方式上线也就是先起一个新应用再删一个老应用如果这时候老应用有部分的流量突然把老应用的进程杀了这部分流量就无法得到正确的处理部分用户也会因此受到影响怎么才会不受影响呢假如我们在停止应用之前先告诉网关或者注册中心等对方把我们应用摘除后再下线这样就不会有任何流量受到影响了在K8S中当我们要删除Pod的时候Pod会变成Terminating状态kubelet看到Pod的状态如果为Terminating就会开始执行关闭Pod的流程给Pod发SIGTERM信号如果达到宽限期Pod还未结束就给Pod发SIGKILL信号从Endpoints中摘除Pod等从上面可知Pod在停止之前会收到SIG信号如果应用本身没有处理这些信号的能力那应用如果知道什么时候该结束呢下面简单定义一个处理SIG信号的功能package shutdownimport ("context""fmt""net/http""os""os/signal""time")// 优雅退出type Shutdown struct { ch chan os.Signal timeout time.Duration}func New(t time.Duration) *Shutdown {return &Shutdown{ ch: make(chan os.Signal), timeout: t, }}func (s *Shutdown) Add(signals ...os.Signal) { signal.Notify(s.ch, signals...)}func (s *Shutdown) Start(server *http.Server) { <-s.ch fmt.Println("start exist......") ctx, cannel := context.WithTimeout(context.Background(), s.timeout*time.Second)defer cannel()if err := server.Shutdown(ctx); err != nil { fmt.Println("Graceful exit failed. err: ", err) } fmt.Println("Graceful exit success.")}package mainimport ("github.com/gin-gonic/gin""go-hello-world/pkg/shutdown""go-hello-world/router""log""net/http""syscall""time")func main() { r := gin.New()// 注册路由 router.SetupRouter(r) server := &http.Server{ Addr: ":8080", Handler: r, }// 运行服务go func() { err := server.ListenAndServe()if err != nil && err != http.ErrServerClosed { log.Fatalf("server.ListenAndServe err: %v", err) } }()// 优雅退出 quit := shutdown.New(10) quit.Add(syscall.SIGINT, syscall.SIGTERM) quit.Start(server)}当接收到SIG信号的时候就会调用Shutdown方法做应用退出处理除此还要结合K8S的PreStop Hook来定义结束前的钩子如下:lifecycle:preStop:exec:command:- /bin/sh- '-c'- sleep 30如果使用注册中心比如nacos我们可以在PreStop Hook中先告诉nacos要下线如下:lifecycle:preStop:exec:command:- /bin/sh- -c- "curl -X DELETE your_nacos_ip:8848/nacos/v1/ns/instance?serviceName=nacos.test.1&ip=${POD_IP}&port=8880&clusterName=DEFAULT" && sleep 30定义Metrics接口Metrics主要用来暴露应用指标可以根据实际情况自定义指标以便于监控工具Prometheus进行数据收集展示有些语言有现成的exporter比如java的jmx_exporter没有的就需要自己在应用中集成比如:package mainimport ("github.com/SkyAPM/go2sky" v3 "github.com/SkyAPM/go2sky-plugins/gin/v3""github.com/SkyAPM/go2sky/reporter""github.com/gin-gonic/gin""github.com/prometheus/client_golang/prometheus/promhttp""go-hello-world/pkg/shutdown""go-hello-world/router""log""net/http""syscall""time")var SKYWALKING_ENABLED = falsefunc main() { r := gin.New()// 注册路由 router.SetupRouter(r) server := &http.Server{ Addr: ":8080", Handler: r, }// 启动metrics服务go func() { http.Handle("/metrics", promhttp.Handler())if err := http.ListenAndServe(":9527", nil); err != nil { log.Printf("metrics port listen failed. err: %s", err) } }()// 运行服务go func() { err := server.ListenAndServe()if err != nil && err != http.ErrServerClosed { log.Fatalf("server.ListenAndServe err: %v", err) } }()// 优雅退出 quit := shutdown.New(10) quit.Add(syscall.SIGINT, syscall.SIGTERM) quit.Start(server)}这种会暴露默认的Http指标可以通过curl 127.0.0.1:9527/metrics获取指标......# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.# TYPE promhttp_metric_handler_requests_total counterpromhttp_metric_handler_requests_total{code="200"} 0promhttp_metric_handler_requests_total{code="500"} 0promhttp_metric_handler_requests_total{code="503"} 0如果需要自定义指标的话只需按规则定义即可如下:package metricsimport ("github.com/prometheus/client_golang/prometheus""net/http""time")var (// HttpserverRequestTotal 表示接收http请求总数 HttpserverRequestTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ Name: "httpserver_request_total", Help: "The Total number of httpserver requests", },// 设置标签:请求方法和路径 []string{"method", "endpoint"}) HttpserverRequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Name: "httpserver_request_duration_seconds", Help: "httpserver request duration distribution", Buckets: []float64{0.1, 0.3, 0.5, 0.7, 0.9, 1}, }, []string{"method", "endpoint"}))// 注册监控指标func init() { prometheus.MustRegister(HttpserverRequestTotal) prometheus.MustRegister(HttpserverRequestDuration)}func NewMetrics(router http.HandlerFunc) http.HandlerFunc {return func(w http.ResponseWriter, r *http.Request) { start := time.Now() router(w, r) duration := time.Since(start)// httpserverRequestTotal 记录 HttpserverRequestTotal.With(prometheus.Labels{"method": r.Method, "endpoint": r.URL.Path}).Inc()// httpserverRequestDuration 记录 HttpserverRequestDuration.With(prometheus.Labels{"method": r.Method, "endpoint": r.URL.Path}).Observe(duration.Seconds()) }}这样就定义了httpserver_request_total和httpserver_request_duration_seconds指标引用过后就能在/metrics中看到对应的数据定义好了指标下面就是收集了既可以通过自定义收集规则收集也可以通过自动发现的方式收集为了方便主要采用自动发现的方式我们只需要在deployment的templates中定义好annotationprometheeus就会自动添加采集目标如下:apiVersion: apps/v1kind: Deploymentmetadata:labels:app: httpservername: httpservernamespace: defaultspec:replicas: 2selector:matchLabels:app: httpservertemplate:metadata:annotations:prometheus.io/scrape: "true"prometheus.io/port: "metrics"labels:app: httpserverspec:containers:image: baidjay/httpserver:ubuntu-v3-metricsimagePullPolicy: IfNotPresentlifecycle:preStop:exec:command:- /bin/sh- -c- sleep 15livenessProbe:failureThreshold: 3httpGet:path: /healthzport: httpscheme: HTTPinitialDelaySeconds: 30periodSeconds: 10successThreshold: 1timeoutSeconds: 3name: httpserverports:- containerPort: 8080name: httpprotocol: TCP- name: metricsprotocol: TCPcontainerPort: 9527readinessProbe:failureThreshold: 3httpGet:path: /healthzport: httpscheme: HTTPinitialDelaySeconds: 20periodSeconds: 10successThreshold: 1timeoutSeconds: 3定义Trace功能Trace用于跟踪每个请求都会生成一个TraceID这个ID会伴随请求的整个生命周期我们也可以根据这个ID查询请求的整个链路情况链路追踪目前市面上有很多开源系统比如SkywalkingJeagerZipkin等它们各有各的特点如下Pinpoint Zipkin Jaeger SkywalkingOpenTracing兼容 否 是 是 是客户端支持语言 java\php java\go\php等 java\go\php等 java\nodejs\php等存储 hbase es\mysql\内存等 es\kafka\内存等 es\mysql\h2等传输协议支持 thrift http\mq udp\http grpcUI丰富程度 高 低 中 中实现方式 字节码注入 拦截请求 拦截请求 字节码注入扩展性 低 高 高 中Trace查询 不支持 支持 支持 支持告警支持 支持 不支持 不支持 支持JVM监控 支持 不支持 不支持 支持性能损失 高 中 中 低我比较推荐使用Jaeger它是CNCF的毕业项目成长空间和云原生的系统架构兼容性比较好不过我这里采用的SkywalkingSkywalking有许多现成的客户端比如Java、Python等可以直接使用它们都会自动埋点但是对于Go来说就只有自己手动埋点了需要我们自己去写代码比如:package mainimport ("github.com/SkyAPM/go2sky" v3 "github.com/SkyAPM/go2sky-plugins/gin/v3""github.com/SkyAPM/go2sky/reporter""github.com/gin-gonic/gin""github.com/prometheus/client_golang/prometheus/promhttp""go-hello-world/pkg/shutdown""go-hello-world/router""log""net/http""syscall""time")var SKYWALKING_ENABLED = falsefunc main() { r := gin.New()// 配置skywalkingif SKYWALKING_ENABLED { rp, err := reporter.NewGRPCReporter("skywalking-oap:11800", reporter.WithCheckInterval(time.Second))if err != nil { log.Printf("create gosky reporter failed. err: %s", err) }defer rp.Close() tracer, _ := go2sky.NewTracer("go-hello-world", go2sky.WithReporter(rp)) r.Use(v3.Middleware(r, tracer)) }// 注册路由 router.SetupRouter(r) server := &http.Server{ Addr: ":8080", Handler: r, }// 启动metrics服务go func() { http.Handle("/metrics", promhttp.Handler())if err := http.ListenAndServe(":9527", nil); err != nil { log.Printf("metrics port listen failed. err: %s", err) } }()// 运行服务go func() { err := server.ListenAndServe()if err != nil && err != http.ErrServerClosed { log.Fatalf("server.ListenAndServe err: %v", err) } }()// 优雅退出 quit := shutdown.New(10) quit.Add(syscall.SIGINT, syscall.SIGTERM) quit.Start(server)}定义reporter用于上报数据给Skywalking这就是一个简单的集成Trace的例子定义标准的日志应用的可观测性主要来源日志、监控、链路追踪标准的日志有利于日志收集以及排查问题原则上不论是什么类型的日志输出什么格式的日志内容都能收集但是为了方便友好建议把日志输出到标准输出这样收集更方便我个人理解在K8s中完全没必要把日志输出到文件浪费不说没多大意义因为所有的日志我们都会收集到日志系统而输出到文件的日志也会随着应用发版而丢失所以输出到文件的意义是什么呢运维侧开发把系统开发完就会交付给运维部署为了保障应用的稳定性运维在部署应用的时候应该考虑以下几点应用尽可能保持无状态应用尽可能保持高可用应该具备优雅上线能力应该具备异常自愈能力可以使用HTTPS访问应用尽可能保持无状态K8S中可以部署有状态应用也可以部署无状态应用对于有状态应用我其实很少部署到K8S中大部分还是部署的无状态应用至于为什么用多了就晓得了对于业务应用强烈建议使其保持无状态就算有需要持久化的东西要么保存到数据库要么保存到对象存储或者其他单独的文件系统中不要挂载到应用Pod上这样的好处是应用和数据是分开的应用可以随意启停、扩展、迁移等应用尽可能的保持高可用保持高可用应该是每个运维人员的使命在K8S中我们应该怎么配置呢(1)应用Pod应该是多副本(2)应用Pod之间做反亲和性避免同一应用调度到同一台主机如下......spec:affinity:podAntiAffinity:requiredDuringSchedulingIgnoredDuringExecution:- labelSelector:matchExpressions:- key: appoperator: Invalues: [ "httpserver" ]topologyKey: kubernetes.io/hostname......(3) 为了避免应用因为节点维护等原因驱逐Pod导致全部Pod被驱逐特别配置了PodDisruptionBudget保障应用至少有一个可用如下apiVersion: policy/v1beta1kind: PodDisruptionBudgetmetadata:name: httpserverspec:minAvailable: 1selector:matchLables:app: httpserver(4)如果某个节点因为一些原因需要驱逐一些Pod为了避免重要应用被驱逐应该给应用配置较高的QoS如下:resources:limits:cpu: "1"memory: 2Girequests:cpu: "1"memory: 2Gi应用具备优雅上线能力所谓优雅上线能力就是要确保应用能够提供服务了再接入外界流量不能在还没完全启动的情况下就提供服务在K8S中应用在启动后会加入endpoints中然后通过service接入流量那在什么情况下才算启动成功呢主要是通过K8S的ReadinessProbe来进行检测这时候开发的健康检测接口就派上用场了如下:...readinessProbe:failureThreshold: 3httpGet:path: /healthport: httpscheme: HTTPinitialDelaySeconds: 20periodSeconds: 10successThreshold: 1timeoutSeconds: 3...所以我们K8S的YAML文件应该加上如上的配置应该具备异常自愈能力所谓异常自愈就是应用本身在出现Crash或者应用Pod所在节点出现异常的情况应用能够自动重启或者迁移这时候就需要通过K8S的LivenessProbe来进行检测了如下......livenessProbe:failureThreshold: 3httpGet:path: /healthport: httpscheme: HTTPinitialDelaySeconds: 30periodSeconds: 10successThreshold: 1timeoutSeconds: 3......当K8S的YAML清单加上如上配置过后就会定时去探测应用是否正常如果异常就会触发重启的动作如果是节点异常K8S会对Pod进行重新调度可以使用HTTPS进行访问应用通过HTTPS访问是比较常见的公司级应用建议自己购买相应的SSL证书然后进行配置即可比如# 创建证书secretkubectl create secret tls httpserver-tls-secret --cert=path/to/tls.cert --key=path/to/tls.key# 在ingress中引用......spec:tls:hosts:- httpserver.coolops.cnsecretName: httpserver-tls-secretrules:- host: httpserver.coolops.cn......总结上面介绍了开发和运维对于应用上线应该做的工作不全但够用在不同的公司都有不同的尿性但是作为运维我们都要牢牢记住稳定永远是第一尿性通过上面的梳理我们的应用模板就整理如下:apiVersion: apps/v1kind: Deploymentmetadata:labels:app: httpservername: httpservernamespace: defaultspec:progressDeadlineSeconds: 600replicas: 2revisionHistoryLimit: 10selector:matchLabels:app: httpserverstrategy:rollingUpdate:maxSurge: 25%maxUnavailable: 25%type: RollingUpdatetemplate:metadata:annotations:prometheus.io/scrape: "true"prometheus.io/port: "metrics"labels:app: httpserverspec:affinity:podAntiAffinity:requiredDuringSchedulingIgnoredDuringExecution:- labelSelector:matchExpressions:- key: appoperator: Invalues: [ "httpserver" ]topologyKey: kubernetes.io/hostnamecontainers:- env:- name: TZvalue: Asia/Shanghai- name: POD_NAMEvalueFrom:fieldRef:apiVersion: v1fieldPath: metadata.name- name: POD_NAMESPACEvalueFrom:fieldRef:apiVersion: v1fieldPath: metadata.namespaceimage: baidjay/httpserver:ubuntu-v3-metricsimagePullPolicy: IfNotPresentlifecycle:preStop:exec:command:- /bin/sh- -c- sleep 15livenessProbe:failureThreshold: 3httpGet:path: /healthzport: httpscheme: HTTPinitialDelaySeconds: 30periodSeconds: 10successThreshold: 1timeoutSeconds: 3name: httpserverports:- containerPort: 8080name: httpprotocol: TCP- name: metricsprotocol: TCPcontainerPort: 9527readinessProbe:failureThreshold: 3httpGet:path: /healthzport: httpscheme: HTTPinitialDelaySeconds: 20periodSeconds: 10successThreshold: 1timeoutSeconds: 3resources:limits:cpu: "1"memory: 2Girequests:cpu: "1"memory: 2GisecurityContext: {}terminationMessagePath: /dev/termination-logterminationMessagePolicy: FilednsPolicy: ClusterFirstrestartPolicy: AlwaysschedulerName: default-scheduler---apiVersion: v1kind: Servicemetadata:name: httpserverspec:ports:- name: httpport: 8080protocol: TCPtargetPort: http- name: metricsport: 9527protocol: TCPtargetPort: metricsselector:app: httpserversessionAffinity: Nonetype: ClusterIP---apiVersion: networking.k8s.io/v1kind: Ingressmetadata:annotations:nginx.ingress.kubernetes.io/proxy-body-size: 100mnginx.ingress.kubernetes.io/proxy-connect-timeout: "600"nginx.ingress.kubernetes.io/proxy-read-timeout: "600"nginx.ingress.kubernetes.io/proxy-send-timeout: "600"nginx.ingress.kubernetes.io/service-weight: ""nginx.org/client-max-body-size: 100mname: httpserver-tlsspec:tls:- hosts:- httpserver.coolops.cnsecretName: httpserver-tls-secretrules:- host: httpserver.coolops.cnhttp:paths:- pathType: Prefixpath: /backend:service:name: httpserverport:number: 8080---apiVersion: policy/v1kind: PodDisruptionBudgetmetadata:name: httpserverspec:minAvailable: 1selector:matchLabels:app: httpserver为了凑字数写了一大堆大家凑合看觉得有用就点个赞~~最后求关注如果你还想看更多优质原创文章欢迎关注我们的公众号「运维开发故事」如果我的文章对你有所帮助还请帮忙一下你的支持会激励我输出更高质量的文章非常感谢你还可以把我的公众号设为「星标」这样当公众号文章更新时你会在第一时间收到推送消息避免错过我的文章更新

发布于:新宁县
声明:该文观点仅代表作者本人,搜狐号系信息发布平台,搜狐仅提供信息存储空间服务。
意见反馈 合作

Copyright ? 2023 Sohu All Rights Reserved

搜狐公司 版权所有