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

9.24-k8s服务发布

Ingress

使用域名发布 K8S 服务

部署项目

一、先部署mariadb

[root@k8s-master ~]# mkdir aaa
[root@k8s-master ~]# cd aaa/
[root@k8s-master aaa]# # 先部署mariadb
[root@k8s-master aaa]# # configmap
[root@k8s-master aaa]# vim mariadb-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:name: mariadb-configmap
data:USER: "wp"PASSWORD: "123"ROOT_PASSWORD: "123"DATABASE: "db"[root@k8s-master aaa]# kubectl create -f mariadb-configmap.yaml 
configmap/mariadb-configmap created
[root@k8s-master aaa]# # deployment
[root@k8s-master aaa]# vim mariadb.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:name: mariadb-deploymentlabels:app: mariadb-deployment
spec:replicas: 1selector:matchLabels:app: mariadb-deploymenttemplate:metadata:labels:app: mariadb-deploymentspec:containers:-       name: mariadbimage: docker.io/library/mariadb:latestimagePullPolicy: Neverports:-       name: mariadbportcontainerPort: 3306envFrom:-       prefix: "MARIADB_"configMapRef:name: mariadb-configmap[root@k8s-master aaa]# kubectl create -f mariadb.deployment.yaml 
deployment.apps/mariadb-deployment created
[root@k8s-master aaa]# kubectl get pod
NAME                                  READY   STATUS             RESTARTS      AGE
cluster-test0-58689d5d5d-7c49r        1/1     Running            4 (16m ago)   3d2h
haha-96567ff6f-r2mh5                  0/1     ImagePullBackOff   0             3d2h
mariadb-deployment-5bf6d9f98c-9mddb   1/1     Running            0             22s
wordpress-7695bd58f4-42hx2            1/1     Running            1 (16m ago)   2d23h
wordpress-7695bd58f4-dqp8q            1/1     Running            1 (16m ago)   2d23h
wordpress-7695bd58f4-v8j7l            1/1     Running            1 (16m ago)   2d23h
[root@k8s-master aaa]# kubectl get po -o wide
NAME                                  READY   STATUS             RESTARTS      AGE     IP              NODE         NOMINATED NODE   READINESS GATES
cluster-test0-58689d5d5d-7c49r        1/1     Running            4 (20m ago)   3d2h    172.16.58.193   k8s-node02   <none>           <none>
haha-96567ff6f-r2mh5                  0/1     ImagePullBackOff   0             3d2h    172.16.85.234   k8s-node01   <none>           <none>
mariadb-deployment-5bf6d9f98c-9mddb   1/1     Running            0             4m34s   172.16.85.237   k8s-node01   <none>           <none>
wordpress-7695bd58f4-42hx2            1/1     Running            1 (20m ago)   2d23h   172.16.58.255   k8s-node02   <none>           <none>
wordpress-7695bd58f4-dqp8q            1/1     Running            1 (20m ago)   2d23h   172.16.85.233   k8s-node01   <none>           <none>
wordpress-7695bd58f4-v8j7l            1/1     Running            1 (20m ago)   2d23h   172.16.85.235   k8s-node01   <none>           <none>[root@k8s-master aaa]# mysql -h 172.16.85.237 -p123
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 11.5.2-MariaDB-ubu2404 mariadb.org binary distributionCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> exit
Bye[root@k8s-master aaa]# vim mariadb-service.yaml
[root@k8s-master aaa]# kubectl create -f mariadb-service.yaml 
service/mariadb-service created
[root@k8s-master aaa]# kubectl get svc
NAME              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
kubernetes        ClusterIP   10.96.0.1       <none>        443/TCP          12d
mariadb-service   NodePort    10.96.148.212   <none>        3306:30117/TCP   15s
[root@k8s-master aaa]# kubectl get pod
NAME                                  READY   STATUS             RESTARTS      AGE
cluster-test0-58689d5d5d-7c49r        1/1     Running            4 (33m ago)   3d2h
haha-96567ff6f-r2mh5                  0/1     ImagePullBackOff   0             3d2h
mariadb-deployment-5bf6d9f98c-9mddb   1/1     Running            0             17m
wordpress-7695bd58f4-42hx2            1/1     Running            1 (33m ago)   2d23h
wordpress-7695bd58f4-dqp8q            1/1     Running            1 (33m ago)   2d23h
wordpress-7695bd58f4-v8j7l            1/1     Running            1 (33m ago)   2d23h

二、在远程登录工具上进行登录测试,端口号为30117,用户为root,密码为123

三、使用测试工具:

[root@k8s-master aaa]# kubectl exec -it pods/cluster-test0-58689d5d5d-7c49r -- bash

四、部署wordpress

[root@k8s-master aaa]# vim wordpress-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:name: wordpress-config
data:NAME: "db"USER: "wp"PASSWORD: "123"HOST: "mariadb-service"[root@k8s-master aaa]# kubectl create -f wordpress-configmap.yaml 
configmap/wordpress-config created
[root@k8s-master aaa]# kubectl get cm
NAME                DATA   AGE
kube-root-ca.crt    1      12d
mariadb-cm          4      3d2h
mariadb-configmap   4      50m
wordpress-cm        4      3d
wordpress-config    4      38s
[root@k8s-master aaa]# vim wordpress-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:name: wordpress-deploymentlabels:app: wordpress-deployment
spec:replicas: 2selector:matchLabels:app: wordpress-deploymenttemplate:metadata:labels:app: wordpress-deploymentspec:containers:-       name: wpimage: docker.io/library/wordpress:latestimagePullPolicy: Neverports:-       name: wordpressportcontainerPort: 80envFrom:-        prefix: "WORDPRESS_DB_"configMapRef:name: wordpress-config[root@k8s-master aaa]# kubectl create -f wordpress-deployment.yaml 
deployment.apps/wordpress-deployment created
[root@k8s-master aaa]# kubectl get pod
NAME                                    READY   STATUS             RESTARTS        AGE
cluster-test0-58689d5d5d-7c49r          1/1     Running            5 (9m35s ago)   3d3h
haha-96567ff6f-r2mh5                    0/1     ImagePullBackOff   0               3d3h
mariadb-deployment-5bf6d9f98c-9mddb     1/1     Running            0               54m
wordpress-7695bd58f4-42hx2              1/1     Running            1 (70m ago)     3d
wordpress-7695bd58f4-dqp8q              1/1     Running            1 (70m ago)     3d
wordpress-7695bd58f4-v8j7l              1/1     Running            1 (70m ago)     3d
wordpress-deployment-555685954b-52lbs   1/1     Running            0               15s
wordpress-deployment-555685954b-d8qqz   1/1     Running            0               15s
[root@k8s-master aaa]# vim wordpress-service.yaml
apiVersion: v1
kind: Service
metadata:name: wordpress-deployment
spec:selector:app: wordpress-deploymentports:-       name: httpport: 80targetPort: 80nodePort: 32000protocol: TCPtype: NodePort[root@k8s-master aaa]# kubectl create -f wordpress-service.yaml 
service/wordpress-deployment created
[root@k8s-master aaa]# kubectl get svc
NAME                   TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
kubernetes             ClusterIP   10.96.0.1       <none>        443/TCP          12d
mariadb-service        NodePort    10.96.148.212   <none>        3306:30117/TCP   46m
wordpress-deployment   NodePort    10.96.26.205    <none>        80:32000/TCP     1s

五、浏览器访问本机地址: 192.168.2.66:32000

六、查看db数据中的表

表中是空的

# 使用测试工具测试
[root@k8s-master aaa]# kubectl exec -it cluster-test0-58689d5d5d-7c49r -- bash
(01:10 cluster-test0-58689d5d5d-7c49r:/) nslookup mariadb-service
Server:		10.96.0.10
Address:	10.96.0.10#53Name:	mariadb-service.default.svc.cluster.local
Address: 10.96.148.212(01:10 cluster-test0-58689d5d5d-7c49r:/) exit
exit
您在 /var/spool/mail/root 中有新邮件# 查看节点
[root@k8s-master aaa]# kubectl get po
NAME                                    READY   STATUS    RESTARTS      AGE
cluster-test0-58689d5d5d-7c49r          1/1     Running   6 (21m ago)   3d18h
mariadb-deployment-5bf6d9f98c-9mddb     1/1     Running   1 (21m ago)   16h
wordpress-7695bd58f4-42hx2              1/1     Running   2 (21m ago)   3d16h
wordpress-7695bd58f4-dqp8q              1/1     Running   2 (21m ago)   3d16h
wordpress-7695bd58f4-v8j7l              1/1     Running   2 (21m ago)   3d16h
wordpress-deployment-555685954b-52lbs   1/1     Running   1 (21m ago)   15h
wordpress-deployment-555685954b-d8qqz   1/1     Running   1 (21m ago)   15h# 查看结点的信息
[root@k8s-master aaa]# kubectl get po -o wide
NAME                                    READY   STATUS    RESTARTS      AGE     IP              NODE         NOMINATED NODE   READINESS GATES
cluster-test0-58689d5d5d-7c49r          1/1     Running   6 (22m ago)   3d18h   172.16.58.200   k8s-node02   <none>           <none>
mariadb-deployment-5bf6d9f98c-9mddb     1/1     Running   1 (22m ago)   16h     172.16.85.240   k8s-node01   <none>           <none>
wordpress-7695bd58f4-42hx2              1/1     Running   2 (22m ago)   3d16h   172.16.58.201   k8s-node02   <none>           <none>
wordpress-7695bd58f4-dqp8q              1/1     Running   2 (22m ago)   3d16h   172.16.85.243   k8s-node01   <none>           <none>
wordpress-7695bd58f4-v8j7l              1/1     Running   2 (22m ago)   3d16h   172.16.85.242   k8s-node01   <none>           <none>
wordpress-deployment-555685954b-52lbs   1/1     Running   1 (22m ago)   15h     172.16.58.198   k8s-node02   <none>           <none>
wordpress-deployment-555685954b-d8qqz   1/1     Running   1 (22m ago)   15h     172.16.85.241   k8s-node01   <none>           <none># 登录数据库
[root@k8s-master aaa]# mysql -h 172.16.85.240 -uroot -p123
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 11.5.2-MariaDB-ubu2404 mariadb.org binary distributionCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| db                 |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.01 sec)MariaDB [(none)]> use db
Database changed# 表是空的
MariaDB [db]> show tables;
Empty set (0.00 sec)

七、在访问到的页面进行登录

192.168.2.66:32000

八、db数据库中就有数据了

MariaDB [db]> show tables;
+-----------------------+
| Tables_in_db          |
+-----------------------+
| wp_commentmeta        |
| wp_comments           |
| wp_links              |
| wp_options            |
| wp_postmeta           |
| wp_posts              |
| wp_term_relationships |
| wp_term_taxonomy      |
| wp_termmeta           |
| wp_terms              |
| wp_usermeta           |
| wp_users              |
+-----------------------+
12 rows in set (0.00 sec)MariaDB [db]> select * wp_users;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wp_users' at line 1
MariaDB [db]> select * from wp_users;
+----+------------+------------------------------------+---------------+------------+---------------------------+---------------------+---------------------+-------------+--------------+
| ID | user_login | user_pass                          | user_nicename | user_email | user_url                  | user_registered     | user_activation_key | user_status | display_name |
+----+------------+------------------------------------+---------------+------------+---------------------------+---------------------+---------------------+-------------+--------------+
|  1 | haha       | $P$B9wSyumd047LAk6T9sM5oO7G8IhnsS. | haha          | 123@qq.com | http://192.168.2.66:32000 | 2024-09-24 01:15:54 |                     |           0 | haha         |
+----+------------+------------------------------------+---------------+------------+---------------------------+---------------------+---------------------+-------------+--------------+
1 row in set (0.00 sec)MariaDB [db]> exit
Bye

九、在远程登录工具中也可以看到数据

十、安装 Ingress Contorller

注册 · 语雀 (yuque.com)](注册 · 语雀)

十一、下载附件再导入到服务器内,再进行安装

[root@k8s-master ~]# vim ingress.yaml
[root@k8s-master ~]# kubectl create -f ingress.yaml 
namespace/ingress-nginx created
serviceaccount/ingress-nginx created
serviceaccount/ingress-nginx-admission created
role.rbac.authorization.k8s.io/ingress-nginx created
role.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrole.rbac.authorization.k8s.io/ingress-nginx created
clusterrole.rbac.authorization.k8s.io/ingress-nginx-admission created
rolebinding.rbac.authorization.k8s.io/ingress-nginx created
rolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
configmap/ingress-nginx-controller created
service/ingress-nginx-controller created
service/ingress-nginx-controller-admission created
deployment.apps/ingress-nginx-controller created
job.batch/ingress-nginx-admission-create created
job.batch/ingress-nginx-admission-patch created
ingressclass.networking.k8s.io/nginx created
validatingwebhookconfiguration.admissionregistration.k8s.io/ingress-nginx-admission created
[root@k8s-master ~]# kubectl get po -n ingress-nginx 
NAME                                        READY   STATUS      RESTARTS   AGE
ingress-nginx-admission-create-6hj4c        0/1     Completed   0          71s
ingress-nginx-admission-patch-bt7mj         0/1     Completed   0          71s
ingress-nginx-controller-674f66cf96-lhg8z   1/1     Running     0          72s
[root@k8s-master ~]# kubectl describe  pod -n ingress-nginx ingress-nginx-controller-674f66cf96-lhg8z 
[root@k8s-master ~]# kubectl get service -A
NAMESPACE              NAME                                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
default                kubernetes                           ClusterIP   10.96.0.1       <none>        443/TCP                      12d
default                mariadb-service                      NodePort    10.96.148.212   <none>        3306:30117/TCP               17h
default                wordpress-deployment                 NodePort    10.96.26.205    <none>        80:32000/TCP                 16h
ingress-nginx          ingress-nginx-controller             NodePort    10.96.124.77    <none>        80:32540/TCP,443:32218/TCP   4m7s
ingress-nginx          ingress-nginx-controller-admission   ClusterIP   10.96.175.242   <none>        443/TCP                      4m7s
kube-system            kube-dns                             ClusterIP   10.96.0.10      <none>        53/UDP,53/TCP,9153/TCP       12d
kube-system            metrics-server                       ClusterIP   10.96.212.31    <none>        443/TCP                      11d
kubernetes-dashboard   dashboard-metrics-scraper            ClusterIP   10.96.51.222    <none>        8000/TCP                     11d
kubernetes-dashboard   kubernetes-dashboard                 NodePort    10.96.242.161   <none>        443:30754/TCP                11d
[root@k8s-master ~]# cd pods/
# 创建ingress
[root@k8s-master pods]# vim test0054.yaml
[root@k8s-master pods]# kubectl create -f test0054.yaml 
ingress.networking.k8s.io/nginx-ingress created
[root@k8s-master pods]# kubectl get service -A
NAMESPACE              NAME                                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
default                kubernetes                           ClusterIP   10.96.0.1       <none>        443/TCP                      12d
default                mariadb-service                      NodePort    10.96.148.212   <none>        3306:30117/TCP               21h
default                wordpress-service                    NodePort    10.96.126.255   <none>        80:32000/TCP                 114m
ingress-nginx          ingress-nginx-controller             NodePort    10.96.124.77    <none>        80:32540/TCP,443:32218/TCP   3h42m
ingress-nginx          ingress-nginx-controller-admission   ClusterIP   10.96.175.242   <none>        443/TCP                      3h42m
kube-system            kube-dns                             ClusterIP   10.96.0.10      <none>        53/UDP,53/TCP,9153/TCP       12d
kube-system            metrics-server                       ClusterIP   10.96.212.31    <none>        443/TCP                      12d
kubernetes-dashboard   dashboard-metrics-scraper            ClusterIP   10.96.51.222    <none>        8000/TCP                     12d
kubernetes-dashboard   kubernetes-dashboard                 NodePort    10.96.242.161   <none>        443:30754/TCP                12d

十二、访问测试

(1)修改hosts文件

(2)测试ip

访问 IP+Ingress 映射的端口是无法进入后端服务器的

(3)只有访问先前定义的域名+端口才可访问到后端服务器

本次实战域名服务器为:wp-web.com:30080

后续论坛网站自行搭建

相关文章:

9.24-k8s服务发布

Ingress 使用域名发布 K8S 服务 部署项目 一、先部署mariadb [rootk8s-master ~]# mkdir aaa [rootk8s-master ~]# cd aaa/ [rootk8s-master aaa]# # 先部署mariadb [rootk8s-master aaa]# # configmap [rootk8s-master aaa]# vim mariadb-configmap.yaml apiVersion: v1 ki…...

UI设计师面试整理-作品集展示

在UI设计师的面试中,作品集展示是非常关键的一环。它不仅展示了你的设计技能和风格,也让面试官了解你的设计思维和解决问题的能力。下面是如何有效地准备和展示你的作品集的建议: 1. 选择合适的项目 ● 多样性:选择能展示你在不同领域或平台上的设计能力的项目。确保作品集…...

CMU 10423 Generative AI:lec10(few-shot、提示工程、上下文学习)

文章目录 1 概述2 摘录2.1 zero-shot 和 few-shot一、Zero-shot Learning&#xff08;零样本学习&#xff09;特点&#xff1a;工作原理&#xff1a;优点&#xff1a;缺点&#xff1a; 二、Few-shot Learning&#xff08;少样本学习&#xff09;特点&#xff1a;工作原理&#…...

做数据抓取工作要如何选择ip池

选择合适的IP池对于数据抓取工作至关重要。一个优质的IP池可以提高抓取的效率和成功率&#xff0c;同时减少被目标网站封禁的风险。以下是选择IP池时需要考虑的一些关键因素&#xff1a; 1. IP类型 住宅IP&#xff1a;住宅IP通常来自真实用户&#xff0c;难以被识别为代理。它…...

防止电脑电池老化,禁止usb或者ac接口调试时充电

控制android系统&#xff0c;开发者模式&#xff0c;开启和禁止充电 连接 Android 手机到电脑的 USB 端口。 下载并安装 Android Debug Bridge (ADB) 工具[1]。 USB&#xff1a; 在命令行中输入 adb shell dumpsys battery set usb 0&#xff0c;以禁止 USB 充电。 在命令…...

智权半导体/SmartDV力助高速发展的中国RISC-V CPU IP厂商走上高质量发展之道

作者&#xff1a;Karthik Gopal SmartDV Technologies亚洲区总经理 智权半导体科技&#xff08;厦门&#xff09;有限公司总经理 进入2024年&#xff0c;全球RISC-V社群在技术和应用两个方向上都在加快发展&#xff0c;中国国内的RISC-V CPU IP提供商也在内核性能和应用扩展…...

利用vue-capper封装一个可以函数式调用图片裁剪组件

1. 效果 const cropData await wqCrop({prop:{img,autoCrop: true, // 是否开启截图框maxImgSize: 600,autoCropWidth: 30,canMove: true, // 图片是否可移动canMoveBox: true, // 截图框是否可移动fixedBox: false, // 截图框是否固定}});console.log(cropData);使用wqCrop会…...

在系统开发中提升 Excel 数据导出一致性与可维护性的统一规范与最佳实践

背景&#xff1a; 在系统开发过程中&#xff0c;数据导出为 Excel 格式是一个常见的需求。然而&#xff0c;由于各个开发人员的编码习惯和实现方式不同&#xff0c;导致导出代码风格不一。有的人使用第三方库&#xff0c;有的人则自定义实现。这种多样化不仅影响了代码的一致性…...

SpringAOP学习

面向切面编程&#xff0c;指导开发者如何组织程序结构 增强原始设计的功能 oop:面向对象编程 1.导入aop相关坐标&#xff0c;创建 <!--spring依赖--><dependencies><dependency><groupId>org.springframework</groupId><artifactId>spri…...

智能网联汽车飞速发展,安全危机竟如影随形,如何破局?

随着人工智能、5G通信、大数据等技术的飞速发展&#xff0c;智能网联汽车正在成为全球汽车行业的焦点。特别是我国智能网联汽车市场规模近年来呈现快速增长态势&#xff0c;彰显了行业蓬勃发展的活力与潜力。然而&#xff0c;车联网技术的广泛应用也带来了一系列网络安全问题&a…...

Android常用C++特性之std::function

声明&#xff1a;本文内容生成自ChatGPT&#xff0c;目的是为方便大家了解学习作为引用到作者的其他文章中。 std::function 是 C 标准库中的一个 函数包装器&#xff0c;用于存储、复制、调用任何可以调用的目标&#xff08;如普通函数、lambda 表达式、函数对象、成员函数等&…...

人工智能与机器学习原理精解【27】

文章目录 集成学习集成学习概述集成学习的定义集成学习的性质集成学习的算法过程集成学习的算法描述集成学习的例子和例题Julia实现集成学习 集成学习数学原理一、基学习器的生成Bagging&#xff08;装袋法&#xff09;Boosting&#xff08;提升法&#xff09; 二、基学习器的结…...

XXL-JOB在SpringBoot中的集成

在SpringBoot中&#xff0c;XXL-JOB作为一个轻量级的分布式任务调度平台&#xff0c;提供了灵活的任务分片处理功能&#xff0c;这对于处理大规模、复杂的任务场景尤为重要。以下将详细探讨如何在SpringBoot中利用XXL-JOB实现灵活控制的分片处理方案&#xff0c;涵盖配置、代码…...

前端工程规范-3:CSS规范(Stylelint)

样式规范工具&#xff08;StyleLint&#xff09; Stylelint 是一个灵活且强大的工具&#xff0c;适用于保持 CSS 代码的质量和一致性。结合其他工具&#xff08;如 Prettier 和 ESLint&#xff09;&#xff0c;可以更全面地保障前端代码的整洁性和可维护性。 目录 样式规范工具…...

Qt系列-1.Qt安装

Qt安装 0 简介 1.安装步骤 1.1 下载 进入qt中文网站:https://www.qt.io/zh-cn/ Qt开源社区版本:https://www.qt.io/download-open-source#source 1.2 安装 chmod +x qt-online-installer-linux-x64-4.8.0.run ./qt-online-installer-linux-x64-4.8.0.run 外网不能下载…...

《自控原理》最小相位系统

在复平面右半平面既没有零点&#xff0c;也没有极点的系统&#xff0c;称为最小相位系统&#xff0c;其余均为非最小相位系统。 从知乎看了一篇答案&#xff1a; https://www.zhihu.com/question/24163919 证明过程大概率比较难&#xff0c;我翻了两本自控的教材&#xff0c;…...

SpringBoot3脚手架

MySpringBootAPI SpringBoot3脚手架&#xff0c;基于SpringBoot3DruidPgSQLMyBatisPlus13FastJSON2Lombok&#xff0c;启动web容器为Undertow(非默认tomcat)&#xff0c;其他的请自行添加和配置。 <java.version>17</java.version> <springboot.version>3.3…...

【C语言软开面经】

C语言软开面经 malloc calloc realloc free动态分配内存malloccalloc函数&#xff1a;realloc 函数&#xff1a;free函数&#xff1a; 堆栈-内存分区栈区&#xff08;Stack&#xff09;&#xff1a;堆区&#xff08;Heap&#xff09;&#xff1a;全局&#xff08;静态&#xff…...

YOLOv11训练自己的数据集(从代码下载到实例测试)

文章目录 前言一、YOLOv11模型结构图二、环境搭建三、构建数据集四、修改配置文件①数据集文件配置②模型文件配置③训练文件配置 五、模型训练和测试模型训练模型验证模型推理 总结 前言 提示&#xff1a;本文是YOLOv11训练自己数据集的记录教程&#xff0c;需要大家在本地已…...

HTML粉色烟花秀

目录 系列文章 写在前面 完整代码 下载代码 代码分析 写在最后 系列文章 序号目录1HTML满屏跳动的爱心(可写字)2HTML五彩缤纷的爱心3HTML满屏漂浮爱心4...

深入剖析AI大模型:大模型时代的 Prompt 工程全解析

今天聊的内容&#xff0c;我认为是AI开发里面非常重要的内容。它在AI开发里无处不在&#xff0c;当你对 AI 助手说 "用李白的风格写一首关于人工智能的诗"&#xff0c;或者让翻译模型 "将这段合同翻译成商务日语" 时&#xff0c;输入的这句话就是 Prompt。…...

docker详细操作--未完待续

docker介绍 docker官网: Docker&#xff1a;加速容器应用程序开发 harbor官网&#xff1a;Harbor - Harbor 中文 使用docker加速器: Docker镜像极速下载服务 - 毫秒镜像 是什么 Docker 是一种开源的容器化平台&#xff0c;用于将应用程序及其依赖项&#xff08;如库、运行时环…...

Nginx server_name 配置说明

Nginx 是一个高性能的反向代理和负载均衡服务器&#xff0c;其核心配置之一是 server 块中的 server_name 指令。server_name 决定了 Nginx 如何根据客户端请求的 Host 头匹配对应的虚拟主机&#xff08;Virtual Host&#xff09;。 1. 简介 Nginx 使用 server_name 指令来确定…...

初探Service服务发现机制

1.Service简介 Service是将运行在一组Pod上的应用程序发布为网络服务的抽象方法。 主要功能&#xff1a;服务发现和负载均衡。 Service类型的包括ClusterIP类型、NodePort类型、LoadBalancer类型、ExternalName类型 2.Endpoints简介 Endpoints是一种Kubernetes资源&#xf…...

在 Spring Boot 项目里,MYSQL中json类型字段使用

前言&#xff1a; 因为程序特殊需求导致&#xff0c;需要mysql数据库存储json类型数据&#xff0c;因此记录一下使用流程 1.java实体中新增字段 private List<User> users 2.增加mybatis-plus注解 TableField(typeHandler FastjsonTypeHandler.class) private Lis…...

Linux部署私有文件管理系统MinIO

最近需要用到一个文件管理服务&#xff0c;但是又不想花钱&#xff0c;所以就想着自己搭建一个&#xff0c;刚好我们用的一个开源框架已经集成了MinIO&#xff0c;所以就选了这个 我这边对文件服务性能要求不是太高&#xff0c;单机版就可以 安装非常简单&#xff0c;几个命令就…...

【版本控制】GitHub Desktop 入门教程与开源协作全流程解析

目录 0 引言1 GitHub Desktop 入门教程1.1 安装与基础配置1.2 核心功能使用指南仓库管理日常开发流程分支管理 2 GitHub 开源协作流程详解2.1 Fork & Pull Request 模型2.2 完整协作流程步骤步骤 1: Fork&#xff08;创建个人副本&#xff09;步骤 2: Clone&#xff08;克隆…...

RabbitMQ 各类交换机

为什么要用交换机&#xff1f; 交换机用来路由消息。如果直发队列&#xff0c;这个消息就被处理消失了&#xff0c;那别的队列也需要这个消息怎么办&#xff1f;那就要用到交换机 交换机类型 1&#xff0c;fanout&#xff1a;广播 特点 广播所有消息​​&#xff1a;将消息…...

RLHF vs RLVR:对齐学习中的两种强化方式详解

在语言模型对齐&#xff08;alignment&#xff09;中&#xff0c;强化学习&#xff08;RL&#xff09;是一种重要的策略。而其中两种典型形式——RLHF&#xff08;Reinforcement Learning with Human Feedback&#xff09; 与 RLVR&#xff08;Reinforcement Learning with Ver…...

PLC入门【4】基本指令2(SET RST)

04 基本指令2 PLC编程第四课基本指令(2) 1、运用上接课所学的基本指令完成个简单的实例编程。 2、学习SET--置位指令 3、RST--复位指令 打开软件(FX-TRN-BEG-C)&#xff0c;从 文件 - 主画面&#xff0c;“B: 让我们学习基本的”- “B-3.控制优先程序”。 点击“梯形图编辑”…...