K8S Deployment 学习

news/2025/9/26 10:18:54/文章来源:https://www.cnblogs.com/davidtian/p/19112991

1. Deployment 是什么?
Deployment 是 Kubernetes 最常用的控制器之一,用于声明式地管理一组 Pod 副本(通常是无状态应用),实现自动部署、滚动升级、回滚等功能。

它是生产环境推荐的工作负载类型。
底层自动创建和管理 ReplicaSet,保证你定义的 Pod 副本数始终健康。
支持零停机滚动升级、版本回滚。
可以扩容缩容、自动重建失败 Pod。

2. Deployment 的核心功能
管理副本数(replicas)
自动重建失败的 Pod
支持滚动升级(Rolling Update)
支持回滚(Rollback)
配合 Service 暴露应用

3. Deployment YAML 示例

apiVersion: apps/v1
kind: Deployment
metadata:name: nginx-deploy
spec:replicas: 3selector:matchLabels:app: nginxtemplate:metadata:labels:app: nginxspec:containers:- name: nginximage: nginx:1.25.3ports:- containerPort: 80

4.部署测试
4.1.创建了deployment.yaml
4.2 部署测试

azureuser@master-001:~$ vi deployment1.yaml
# 执行失败,因为matchlabels 要改成 matchLabels
azureuser@master-001:~$ kubectl create -f deployment1.yaml
Error from server (BadRequest): error when creating "deployment1.yaml": Deployment in version "v1" cannot be handled as a Deployment: strict decoding error: unknown field "spec.selector.matchlabels"
azureuser@master-001:~$ vi deployment1.yaml
azureuser@master-001:~$ kubectl apply -f deployment1.yaml
deployment.apps/nginx-deploy created
azureuser@master-001:~$ kubectl get pod
NAME                            READY   STATUS    RESTARTS   AGE
nginx-deploy-789bf7b8fc-pnmbp   1/1     Running   0          6s
nginx-deploy-789bf7b8fc-v5fcw   1/1     Running   0          6s
nginx-deploy-789bf7b8fc-xphxk   1/1     Running   0          6s
azureuser@master-001:~$ kubectl get service
NAME           TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP        42h
nodeport-svc   NodePort    10.101.111.134   <none>        80:30443/TCP   41h
web-svc        ClusterIP   10.104.249.89    <none>        80/TCP         41h
azureuser@master-001:~$ kubectl get all
NAME                                READY   STATUS    RESTARTS   AGE
pod/nginx-deploy-789bf7b8fc-pnmbp   1/1     Running   0          17s
pod/nginx-deploy-789bf7b8fc-v5fcw   1/1     Running   0          17s
pod/nginx-deploy-789bf7b8fc-xphxk   1/1     Running   0          17sNAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
service/kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP        42h
service/nodeport-svc   NodePort    10.101.111.134   <none>        80:30443/TCP   41h
service/web-svc        ClusterIP   10.104.249.89    <none>        80/TCP         41hNAME                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx-deploy   3/3     3            3           17sNAME                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-deploy-789bf7b8fc   3         3         3       17s
azureuser@master-001:~$ kubectl scale deployment nginx-deploy --replicas=5
deployment.apps/nginx-deploy scaled
azureuser@master-001:~$ kubectl get all
NAME                                READY   STATUS    RESTARTS   AGE
pod/nginx-deploy-789bf7b8fc-62qzp   1/1     Running   0          3s
pod/nginx-deploy-789bf7b8fc-8jlgt   1/1     Running   0          3s
pod/nginx-deploy-789bf7b8fc-pnmbp   1/1     Running   0          68s
pod/nginx-deploy-789bf7b8fc-v5fcw   1/1     Running   0          68s
pod/nginx-deploy-789bf7b8fc-xphxk   1/1     Running   0          68sNAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
service/kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP        42h
service/nodeport-svc   NodePort    10.101.111.134   <none>        80:30443/TCP   41h
service/web-svc        ClusterIP   10.104.249.89    <none>        80/TCP         41hNAME                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx-deploy   5/5     5            5           68sNAME                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-deploy-789bf7b8fc   5         5         5       68s
#设置滚动升级
azureuser@master-001:~$ kubectl set image deployment/nginx-deploy nginx=nginx:1.26.0
deployment.apps/nginx-deploy image updated
#查看升级状态
azureuser@master-001:~$ kubectl rollout status deployment/nginx-deploy
Waiting for deployment "nginx-deploy" rollout to finish: 3 out of 5 new replicas have been updated...
Waiting for deployment "nginx-deploy" rollout to finish: 3 out of 5 new replicas have been updated...
Waiting for deployment "nginx-deploy" rollout to finish: 3 out of 5 new replicas have been updated...
Waiting for deployment "nginx-deploy" rollout to finish: 3 out of 5 new replicas have been updated...
Waiting for deployment "nginx-deploy" rollout to finish: 3 out of 5 new replicas have been updated...
Waiting for deployment "nginx-deploy" rollout to finish: 4 out of 5 new replicas have been updated...
Waiting for deployment "nginx-deploy" rollout to finish: 4 out of 5 new replicas have been updated...
Waiting for deployment "nginx-deploy" rollout to finish: 4 out of 5 new replicas have been updated...
Waiting for deployment "nginx-deploy" rollout to finish: 2 old replicas are pending termination...
Waiting for deployment "nginx-deploy" rollout to finish: 2 old replicas are pending termination...
Waiting for deployment "nginx-deploy" rollout to finish: 2 old replicas are pending termination...
Waiting for deployment "nginx-deploy" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "nginx-deploy" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "nginx-deploy" rollout to finish: 1 old replicas are pending termination...
#查看状态
azureuser@master-001:~$ kubectl get all
NAME                                READY   STATUS    RESTARTS   AGE
pod/nginx-deploy-8556777689-2dd92   1/1     Running   0          9s
pod/nginx-deploy-8556777689-9r8w2   1/1     Running   0          9s
pod/nginx-deploy-8556777689-b9hwl   1/1     Running   0          8s
pod/nginx-deploy-8556777689-h5fcm   1/1     Running   0          9s
pod/nginx-deploy-8556777689-sm89m   1/1     Running   0          8sNAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
service/kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP        42h
service/nodeport-svc   NodePort    10.101.111.134   <none>        80:30443/TCP   41h
service/web-svc        ClusterIP   10.104.249.89    <none>        80/TCP         41hNAME                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx-deploy   5/5     5            5           3m47sNAME                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-deploy-789bf7b8fc   0         0         0       3m47s
replicaset.apps/nginx-deploy-8556777689   5         5         5       116s
azureuser@master-001:~$ kubectl describe pod nginx-deploy-8556777689-2dd92
Name:             nginx-deploy-8556777689-2dd92
Namespace:        default
Priority:         0
Service Account:  default
Node:             node-002/10.0.0.5
Start Time:       Fri, 26 Sep 2025 02:04:18 +0000
Labels:           app=nginxpod-template-hash=8556777689
Annotations:      <none>
Status:           Running
IP:               10.244.2.18
IPs:IP:           10.244.2.18
Controlled By:  ReplicaSet/nginx-deploy-8556777689
Containers:nginx:Container ID:   containerd://3f887301dd84b198c8bfbb03bcd9bdaf02f5f40603dffaaded1ebb8ac9fa6337Image:          nginx:1.26.0Image ID:       docker.io/library/nginx@sha256:192e88a0053c178683ca139b9d9a2afb0ad986d171fae491949fe10970dd9da9Port:           80/TCPHost Port:      0/TCPState:          RunningStarted:      Fri, 26 Sep 2025 02:04:19 +0000Ready:          TrueRestart Count:  0Environment:    <none>Mounts:/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-kkpnp (ro)
Conditions:Type              StatusInitialized       TrueReady             TrueContainersReady   TruePodScheduled      True
Volumes:kube-api-access-kkpnp:Type:                    Projected (a volume that contains injected data from multiple sources)TokenExpirationSeconds:  3607ConfigMapName:           kube-root-ca.crtConfigMapOptional:       <nil>DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300snode.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:Type    Reason     Age   From               Message----    ------     ----  ----               -------Normal  Scheduled  23s   default-scheduler  Successfully assigned default/nginx-deploy-8556777689-2dd92 to node-002Normal  Pulled     23s   kubelet            Container image "nginx:1.26.0" already present on machineNormal  Created    23s   kubelet            Created container nginxNormal  Started    23s   kubelet            Started container nginxazureuser@master-001:~$ kubectl describe pod nginx-deploy-8556777689-2dd92
Name:             nginx-deploy-8556777689-2dd92
Namespace:        default
Priority:         0
Service Account:  default
Node:             node-002/10.0.0.5
Start Time:       Fri, 26 Sep 2025 02:04:18 +0000
Labels:           app=nginxpod-template-hash=8556777689
Annotations:      <none>
Status:           Running
IP:               10.244.2.18
IPs:IP:           10.244.2.18
Controlled By:  ReplicaSet/nginx-deploy-8556777689
Containers:nginx:Container ID:   containerd://3f887301dd84b198c8bfbb03bcd9bdaf02f5f40603dffaaded1ebb8ac9fa6337Image:          nginx:1.26.0Image ID:       docker.io/library/nginx@sha256:192e88a0053c178683ca139b9d9a2afb0ad986d171fae491949fe10970dd9da9Port:           80/TCPHost Port:      0/TCPState:          RunningStarted:      Fri, 26 Sep 2025 02:04:19 +0000Ready:          TrueRestart Count:  0Environment:    <none>Mounts:/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-kkpnp (ro)
Conditions:Type              StatusInitialized       TrueReady             TrueContainersReady   TruePodScheduled      True
Volumes:kube-api-access-kkpnp:Type:                    Projected (a volume that contains injected data from multiple sources)TokenExpirationSeconds:  3607ConfigMapName:           kube-root-ca.crtConfigMapOptional:       <nil>DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300snode.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:Type    Reason     Age   From               Message----    ------     ----  ----               -------Normal  Scheduled  44s   default-scheduler  Successfully assigned default/nginx-deploy-8556777689-2dd92 to node-002Normal  Pulled     44s   kubelet            Container image "nginx:1.26.0" already present on machineNormal  Created    44s   kubelet            Created container nginxNormal  Started    44s   kubelet            Started container nginx
#设置升级回滚到之前的版本
azureuser@master-001:~$ kubectl rollout undo deployment/nginx-deploy
deployment.apps/nginx-deploy rolled back
#查看状态
azureuser@master-001:~$ kubectl get all
NAME                                READY   STATUS    RESTARTS   AGE
pod/nginx-deploy-789bf7b8fc-bsr87   1/1     Running   0          32s
pod/nginx-deploy-789bf7b8fc-c9jhq   1/1     Running   0          31s
pod/nginx-deploy-789bf7b8fc-frvht   1/1     Running   0          31s
pod/nginx-deploy-789bf7b8fc-q94sb   1/1     Running   0          32s
pod/nginx-deploy-789bf7b8fc-szzm6   1/1     Running   0          32sNAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
service/kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP        42h
service/nodeport-svc   NodePort    10.101.111.134   <none>        80:30443/TCP   41h
service/web-svc        ClusterIP   10.104.249.89    <none>        80/TCP         41hNAME                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx-deploy   5/5     5            5           3m10sNAME                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-deploy-789bf7b8fc   5         5         5       3m10s
replicaset.apps/nginx-deploy-8556777689   0         0         0       79s
azureuser@master-001:~$ kubectl describe pod nginx-deploy-789bf7b8fc-bsr87
Name:             nginx-deploy-789bf7b8fc-bsr87
Namespace:        default
Priority:         0
Service Account:  default
Node:             node-002/10.0.0.5
Start Time:       Fri, 26 Sep 2025 02:03:18 +0000
Labels:           app=nginxpod-template-hash=789bf7b8fc
Annotations:      <none>
Status:           Running
IP:               10.244.2.15
IPs:IP:           10.244.2.15
Controlled By:  ReplicaSet/nginx-deploy-789bf7b8fc
Containers:nginx:Container ID:   containerd://2211ce5c614e87614738504a7a62890a5728e443de103dc270f2a779cc21cd76Image:          nginx:1.25.3Image ID:       docker.io/library/nginx@sha256:c7a6ad68be85142c7fe1089e48faa1e7c7166a194caa9180ddea66345876b9d2Port:           80/TCPHost Port:      0/TCPState:          RunningStarted:      Fri, 26 Sep 2025 02:03:19 +0000Ready:          TrueRestart Count:  0Environment:    <none>Mounts:/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-6ltbd (ro)
Conditions:Type              StatusInitialized       TrueReady             TrueContainersReady   TruePodScheduled      True
Volumes:kube-api-access-6ltbd:Type:                    Projected (a volume that contains injected data from multiple sources)TokenExpirationSeconds:  3607ConfigMapName:           kube-root-ca.crtConfigMapOptional:       <nil>DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300snode.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:Type    Reason     Age   From               Message----    ------     ----  ----               -------Normal  Scheduled  49s   default-scheduler  Successfully assigned default/nginx-deploy-789bf7b8fc-bsr87 to node-002Normal  Pulled     49s   kubelet            Container image "nginx:1.25.3" already present on machineNormal  Created    49s   kubelet            Created container nginxNormal  Started    49s   kubelet            Started container nginx#对外发布service
azureuser@master-001:~$ kubectl expose deployment nginx-deploy --port=80 --target-port=80 --type=ClusterIP --name=nginx-svc
service/nginx-svc exposed
#查看状态azureuser@master-001:~$ kubectl get all
NAME                                READY   STATUS    RESTARTS   AGE
pod/nginx-deploy-8556777689-2dd92   1/1     Running   0          57s
pod/nginx-deploy-8556777689-9r8w2   1/1     Running   0          57s
pod/nginx-deploy-8556777689-b9hwl   1/1     Running   0          56s
pod/nginx-deploy-8556777689-h5fcm   1/1     Running   0          57s
pod/nginx-deploy-8556777689-sm89m   1/1     Running   0          56sNAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
service/kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP        42h
service/nginx-svc      ClusterIP   10.102.29.115    <none>        80/TCP         17s
service/nodeport-svc   NodePort    10.101.111.134   <none>        80:30443/TCP   41h
service/web-svc        ClusterIP   10.104.249.89    <none>        80/TCP         41hNAME                           READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx-deploy   5/5     5            5           4m35sNAME                                      DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-deploy-789bf7b8fc   0         0         0       4m35s
replicaset.apps/nginx-deploy-8556777689   5         5         5       2m44s
azureuser@master-001:~$ curl http://10.102.29.115:80
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p><p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p><p><em>Thank you for using nginx.</em></p>
</body>
</html>
azureuser@master-001:~$

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/918101.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

网站建设与管理专业好找工作吗政务公开 加强门户网站建设

文章目录 前言1.CPU架构2.8086寄存器3. 指令流水线4.内存模型5.总线6.硬盘7 计算机启动过程BIOS8.BootLoader9.地址映射10.为什么boot loader要放在0x7c00这个位置&#xff1f;11 显卡是如何显示的12.汇编指令1.环境搭建 12 程序13 x86 汇编指令介绍 前言 x86汇编 详解x86汇编…

全面掌握 Py2neo 与 Neo4j:从容器化部署到高级应用实战 - 详解

全面掌握 Py2neo 与 Neo4j:从容器化部署到高级应用实战 - 详解pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Co…

集训队作业1——qoj#11722

Hamilton 解题报告 题目大意 以如下方式给出一张带权无向图:点集为 \(\{1,2,\dots,n\}\),边有两种:\(\forall 1\leq i<n\),\((i,i+1)\) 之间有边权为 \(0\) 的边;\(\forall 1\leq i<j\leq n\) 且 \(\gcd(i,…

US$59 EGS ISN Authorization for CGDI Prog BMW MSV80 Key Programmer

EGS ISN Authorization for CGDI Prog BMW MSV80 Key ProgrammerNo need shipping. Please pass us serial number of your CGDI Prog BMW.Kindly note this authorization is free if you have CGDI Prog MB or CG Pr…

如何设置将浏览器网页临时禁用网页mathjax渲染直接查看latex编译前的文本

如何设置将浏览器网页临时禁用网页mathjax渲染直接查看latex编译前的文本 以上截图来源自网页:https://www.cnblogs.com/brave-light/p/18855706,感谢原作者的分享。

《IDEA 2025破解 长效使用指南:2099 年有效期配置实战之JetBrains全家桶有效》​

一、简介: intellij idea 是一款广泛使用的集成开发环境(ide),专为提高开发者的生产力和代码质量而设计。作为一个强大的多语言 ide,intellij idea 以其智能代码补全、代码分析和重构功能而闻名。intellij idea 提…

网站服务器安装教程视频教程在线制作软件

mars3d开发过程中点击面图层飞行定位&#xff0c;设置俯仰角度后&#xff0c;layer.flyTo({没有生效的排查思路记录&#xff0c;给大家提供一下以后排查定位问题的方向 问题场景相关代码&#xff1a; 1.项目本身代码&#xff1a; 2.精简了关键性代码后&#xff0c;就可以去ge…

手机网站怎么优化关键词在哪查询网站做的哪些外链

目录 引言一、为什么要开发图层顺序调整功能二、开发思路整理1. 拖拽库方案选择2. cesium图层api查询 三、代码编写1. 编写拖拽组件代码2. 修改原有图层管理代码2.1 图层加载移除的调整2.2 图层顺序与拖拽列表的矛盾 3. 编写图层移动代码 四、总结 引言 本教程主要是围绕Cesium…

软件开发公司如何利用大数据可视化设计提升决策效率

软件开发公司如何利用大数据可视化设计提升决策效率在当下信息爆炸的时代,企业每天都在处理海量数据。然而,数据本身并不等同于价值,关键在于如何让这些复杂的数据被看见、被理解、并最终转化为决策依据。大数据可视…

基于菲涅尔积分的角锥喇叭方向图计算

一、理论基础 角锥喇叭方向图计算基于以下公式: ​​E面方向图​​:H面方向图:其中菲涅尔积分函数:二、Matlab程序实现 2.1 菲涅尔积分函数定义 function [C,S] = fresnel_int(x)% 自适应辛普森积分法计算菲涅尔积…

Flask的ORM工具SQLAlchemy

Flask的ORM工具SQLAlchemy 一、ORM 是什么? ORM(Object-Relational Mapping,对象关系映射)是一种编程技术,用于在面向对象的编程语言与关系型数据库之间建立映射关系。它允许开发者使用面向对象的语法(如类、对象…

使用 Rust 和 Tesseract OCR 实现英文数字验证码识别

Rust 是一门注重内存安全并具有高性能的系统编程语言。它通过并发机制和零成本抽象提供了强大的功能。我们可以利用 Rust 的库来调用 Tesseract OCR 实现验证码识别。 一、安装与配置 安装 Tesseract OCR 同样,首先要…

构建复合AI系统以实现可扩展工作流

了解如何利用复合AI系统架构化模块化且安全的智能体工作流,以实现可扩展的企业自动化。生成式AI、大语言模型和多智能体编排的融合催生了一个变革性的概念:复合AI系统。这些架构超越了单个模型或助手,代表了智能代理…

seo网站诊断顾问微博wordpress插件

题目大意&#xff1a; 给定一段连续的整数&#xff0c;求出他们中所有偶数的平方和以及所有奇数的立方和。 解答&#xff1a; 坑你没商量&#xff01;要考虑输入数a,b的大小。如果a>b,需要交换a&#xff0c;b的值。转载于:https://www.cnblogs.com/ZJUT-jiangnan/p/3613488.…

Python HTTPS 爬虫实战,requests aiohttp Selenium 抓取技巧、HTTPS 问题与抓包调试(python https爬虫、反爬、抓包、证书处理)

本文讲解 Python HTTPS 爬虫实战:requests/ aiohttp/ Selenium 的使用场景、证书与 TLS 问题处理、反爬策略与代理池构建,及如何用 mitmproxy/Charles 和真机直连工具(抓包大师 Sniffmaster)做 HTTPS 抓包与握手分…

网站素材设计手机网站排名怎么做

介绍 最近在导入数据库数据, 有时候给的数据源文件,存在重复数据, 需要清除但是还需要保留一条记录的需求. 本文将介绍如何使用SQL Server来实现这个需求。 流程 下面是实现删除重复数据的流程&#xff0c;我们可以用表格展示每个步骤&#xff1a; 步骤 描述 步骤一 先…

电子商务物流网站建设规划方案wordpress主题 报纸

当谈到可视化工具时&#xff0c;有许多常用的工具可供选择。这些工具可以帮助我们将数据转化为易于理解和具有视觉吸引力的图表、图形和仪表板。 以下是10款常用的可视化工具&#xff0c;它们在不同领域和用途中广泛使用。 1. Datainside&#xff1a; Datainside是一款功能强…

网站服务商是什么无代码网站建设培训

作者 | Manish Gupta OneFlow编译 翻译&#xff5c;宛子琳、杨婷 AI驱动的技术正逐渐融入人们日常生活的各个角落&#xff0c;有望提高人们获取知识的能力&#xff0c;并提升整体生产效率。语言大模型&#xff08;LLM&#xff09;正是这些应用的核心。LLM对内存的需求很高&…

深入解析:基于开源AI大模型AI智能名片S2B2C商城小程序的产地优势产品营销策略研究

深入解析:基于开源AI大模型AI智能名片S2B2C商城小程序的产地优势产品营销策略研究pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; fon…

GreatSQL 优化技巧:最值子查询与窗口函数相互转换

GreatSQL 优化技巧:最值子查询与窗口函数相互转换 导语 近期 SQL 优化过程中遇到两个案例,一个是将最值子查询改写为窗口函数,另一个是将窗口函数改写为最值子查询,觉得很有意思,特此记录分享一下。 SQL案例 两个…