ubuntu 22.04安装k8s高可用集群

文章目录

  • 1.环境准备(所有节点)
    • 1.1 关闭无用服务
    • 1.2 环境和网络
    • 1.3 apt源
    • 1.4 系统优化
    • 1.5 安装nfs客户端
  • 2. 装containerd(所有节点)
  • 3. master的高可用方案(master上操作)
    • 3.1 安装以及配置haproxy(3master相同)
    • 3.2 keepalived
      • 1)master-01
      • 2)master-02
      • 3)master-03
  • 4. 核心组件安装(所有节点)
    • 4.1 kubelet、kubeadm、kubectl安装
    • 4.2 提前下载镜像(所有节点)【非必要】
    • 4.2 缺少一个镜像
  • 5. 集群初始化
    • 5.1 主机名
    • 5.2 初始化
      • 1)master-01
      • 2)其他master
      • 3)node节点
      • 4) 检查
    • 5.3 网络安装
  • 6. storageclass 的安装

1.环境准备(所有节点)

  • 服务器规划
类型IP 地址主机名
Master 110.10.239.155k8s-master-01
Master 210.10.239.156k8s-master-02
Master 310.10.239.161k8s-master-03
虚拟IP10.10.239.150apiserver-vip
  • 系统信息
root@cto-gpu-pro-n01:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy

1.1 关闭无用服务

  • 关闭交换分区
# sed -i "/swap/{s/^/#/g}" /etc/fstab
# swapoff -a
  • 关闭防火墙
root@boe:~# ufw disable
root@boe:~# ufw status
Status: inactive

1.2 环境和网络

  • hostname
# hostname master-01
# vim /etc/hostmame
  • hosts
cat >> /etc/hosts << EOF
10.10.239.155 master-01
10.10.239.156 master-02
10.10.239.157 master-03
EOF
  • 打开路由
# cat > /etc/sysctl.d/k8s.conf << EOF
net.bridge.bridge-nf-call-ip6tables = 1 
net.bridge.bridge-nf-call-iptables = 1 
net.ipv4.ip_forward = 1 
EOF
# modprobe br_netfilter 
# echo br_netfilter | tee /etc/modules-load.d/k8s.conf
# sysctl -p /etc/sysctl.d/k8s.conf 
  • 加载内核模块
#cat > /etc/modules-load.d/ipvs.conf <<EOF 
ip_vs
ip_vs_lc
ip_vs_wlc
ip_vs_rr
ip_vs_wrr
ip_vs_lblc
ip_vs_lblcr
ip_vs_dh
ip_vs_sh
ip_vs_fo
ip_vs_nq
ip_vs_sed
ip_vs_ftp
nf_conntrack
EOF# systemctl restart systemd-modules-load.service

验证结果如下:


root@boe:~# lsmod | grep '^ip_vs'
ip_vs_ftp              16384  0
ip_vs_sed              16384  0
ip_vs_nq               16384  0
ip_vs_fo               16384  0
ip_vs_sh               16384  0
ip_vs_dh               16384  0
ip_vs_lblcr            16384  0
ip_vs_lblc             16384  0
ip_vs_wrr              16384  0
ip_vs_rr               16384  1338
ip_vs_wlc              16384  0
ip_vs_lc               16384  0
ip_vs                 176128  1366 ip_vs_wlc,ip_vs_rr,ip_vs_dh,ip_vs_lblcr,ip_vs_sh,ip_vs_fo,ip_vs_nq,ip_vs_lblc,ip_vs_wrr,ip_vs_lc,ip_vs_sed,ip_vs_ftp

1.3 apt源

  • apt源的配置文件
vim /etc/apt/sources.list
  • 内容如下
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://archive.ubuntu.com/ubuntu/ jammy universe
deb http://archive.ubuntu.com/ubuntu/ jammy-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates multiverse## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiversedeb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted
deb http://archive.ubuntu.com/ubuntu/ jammy-security universe
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security universe
deb http://archive.ubuntu.com/ubuntu/ jammy-security multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security multiverse
  • 安装依赖工具(非必要)
apt install vim wget curl net-tools  bind9-utils socat ipvsadm ipset
  • vim: 用于安装 Vim 编辑器。
  • wget: 用于下载文件的命令行工具。
  • curl: 用于与服务器通信的命令行工具,常用于测试和下载数据。
  • net-tools: 包含一些基本的网络工具,如 ifconfig,netstat 等。
  • conntrack-tools: 包含用于管理和查看连接跟踪表的工具(如 conntrack)。
  • bind9-utils: 提供一些与 DNS 相关的工具,如 dig,nslookup 等。
  • socat: 用于处理网络和文件的双向数据流。
  • ipvsadm: 用于配置 IP 虚拟服务器(IPVS)。
  • ipset: 用于管理 IP 集合(用于防火墙等)。
  • 缓存离线包(非必要)

用下边这个脚本可以把以上服务的依赖下载到本地

#!/bin/bashPACKAGES="vim wget curl net-tools bind9-utils socat ipvsadm ipset"
mkdir -p ./deb-downloads
cd ./deb-downloads || exitfor pkg in $PACKAGES; doecho "正在处理 $pkg 及其依赖..."apt-rdepends "$pkg" | grep -v "^ " | grep -vE '^(debconf-2.0|perlapi-|libc6|libgcc-s1|linux-libc-dev|gcc-|gcc-|base-files)$' | sort -u | while read dep; doecho "下载 $dep ..."apt download "$dep" || echo "警告:无法下载 $dep"done
done

以后安装使用

sudo dpkg -i /usr/local/src/pkg-down/tools/deb-downloads/lib*.deb
sudo dpkg -i /usr/local/src/pkg-down/tools/deb-downloads/*.deb

1.4 系统优化

  • 内核优化
# cat >>/etc/sysctl.conf <<EOF
net.ipv4.ip_forward = 1
vm.swappiness = 0
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.tcp_max_syn_backlog = 65536
net.core.netdev_max_backlog =  32768
net.core.somaxconn = 32768
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_max_orphans = 3276800
net.ipv4.ip_local_port_range = 1024  65535
EOF# sysctl -p
  • 句柄数
ulimit -n 655350

永修生效修改如下两个文件

# cat >>/etc/security/limits.conf <<EOF
* soft memlock unlimited
* hard memlock unlimited
* soft nofile 655350
* hard nofile 655350
* soft nproc 655350
* hard nproc 655350
EOF
vim /etc/systemd/system.conf
DefaultLimitNOFILE=655350

或者

echo ulimit -n 655350 >>/etc/profile

1.5 安装nfs客户端

以后storageClass需要用

apt install -y nfs-common

2. 装containerd(所有节点)

  • 需要的工具
sudo apt install apt-transport-https ca-certificates software-properties-common
  • 添加秘钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  • 添加apt源
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  • 更新索引
apt update
  • 安装containerd
apt install containerd.io
  • 生产containerd配置文件
mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml
  • 添加 SystemdCgroup = true
# sed -i '/containerd.runtimes.runc.options/a\ \ \ \ \ \ \ \ \ \ \ \ SystemdCgroup = true' /etc/containerd/config.toml 
  • 启动
systemctl start containerd
systemctl enable containerd
  • 测试
ctr images pull docker.io/library/nginx:alpine
  • 缓存安装包(非必要)
apt-rdepends containerd | grep -v "^ " | grep -vE '^(debconf-2.0|perlapi-|libc6|libgcc-s1|linux-libc-dev|gcc-|base-files)$' | sort -u | xargs -I{} sh -c 'echo 下载 {}; apt download {} || echo "警告:无法下载 {}"'

以后安装使用

sudo dpkg -i /usr/local/src/pkg-down/tools/deb-downloads/lib*.deb
sudo dpkg -i /usr/local/src/pkg-down/tools/deb-downloads/*.deb

3. master的高可用方案(master上操作)

在这里插入图片描述

3.1 安装以及配置haproxy(3master相同)

  • 安装
# apt -y install haproxy
  • 修改配置
    修改/etc/haproxy/haproxy.cfg文件
global#   /etc/sysconfig/syslog##    local2.*                       /var/log/haproxy.log#log         127.0.0.1 local2chroot      /var/lib/haproxypidfile     /var/run/haproxy.pidmaxconn     4000user        haproxygroup       haproxydaemondefaultsmode                    tcplog                     globalretries                 3timeout connect         10stimeout client          1mtimeout server          1mfrontend  kubernetesbind *:7443mode tcpdefault_backend kubernetes_masterbackend kubernetes_masterbalance     roundrobinserver master01 10.10.239.155:6443 check maxconn 2000server master02 10.10.239.156:6443 check maxconn 2000server master03 10.10.239.161:6443 check maxconn 2000
  • 启动
# systemctl start haproxy
# systemctl enable haproxy

3.2 keepalived

1)master-01

  • 安装
# apt -y install keepalived
  • 修改配置文件
    修改 /etc/keepalived/keepalived.conf,从节点按注释修改。
global_defs {router_id LVS_DEVELvrrp_skip_check_adv_addr// vrrp_strict vrrp_garp_interval 0vrrp_gna_interval 0
}vrrp_instance VI_1 {state MASTER   #从节点为BACKUPinterface ens4  #根据实际情况修改virtual_router_id 150 #不能和其他集群冲突priority 100   #master最高,根据情况修改  advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {10.10.239.150    #虚拟ip}
}
  • 启动服务
# systemctl enable keepalived
# systemctl start keepalived

2)master-02

  • 安装
# apt -y install keepalived
  • 修改配置文件
    修改 /etc/keepalived/keepalived.conf,从节点按注释修改。
global_defs {router_id LVS_DEVELvrrp_skip_check_adv_addr// vrrp_strict vrrp_garp_interval 0vrrp_gna_interval 0
}vrrp_instance VI_1 {state BACKUPinterface ens4virtual_router_id 150priority 90 advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {10.10.239.150}
}
  • 启动服务
# systemctl enable keepalived
# systemctl start keepalived

3)master-03

  • 安装
# apt -y install keepalived
  • 修改配置文件
    修改 /etc/keepalived/keepalived.conf,从节点按注释修改。
global_defs {router_id LVS_DEVELvrrp_skip_check_adv_addr// vrrp_strict vrrp_garp_interval 0vrrp_gna_interval 0
}vrrp_instance VI_1 {state BACKUPinterface ens4virtual_router_id 150priority 80 advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {10.10.239.150}
}
  • 启动服务
# systemctl enable keepalived
# systemctl start keepalived

4. 核心组件安装(所有节点)

4.1 kubelet、kubeadm、kubectl安装

  • 使得 apt 支持 ssl 传输
apt-get update && apt-get install -y apt-transport-https
  • 加载秘钥
curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -
  • 添加k8s镜像源
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
EOF
  • apt安装
 apt-get install -y kubelet=1.23.17-00 kubeadm=1.23.17-00 kubectl=1.23.17-00
  • runtime
crictl config runtime-endpoint /run/containerd/containerd.sock
  • 启动服务
systemctl daemon-reload
systemctl enable kubelet && systemctl start kubelet 

4.2 提前下载镜像(所有节点)【非必要】

  • 提前下载镜像
kubeadm config images pull --image-repository registry.aliyuncs.com/google_containers
  • 结果
W0528 03:24:37.161961  250879 version.go:105] falling back to the local client version: v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-apiserver:v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-controller-manager:v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-scheduler:v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-proxy:v1.23.17
[config/images] Pulled registry.aliyuncs.com/google_containers/pause:3.6
[config/images] Pulled registry.aliyuncs.com/google_containers/etcd:3.5.6-0
[config/images] Pulled registry.aliyuncs.com/google_containers/coredns:v1.8.6

4.2 缺少一个镜像

说明:集群中已经将需要的镜像改成阿里云镜像了,但是初始化的时候还是会需要检查registry.k8s.io/pause:3.8这个镜像,虽然pod启动时实际用到的仍是阿里云的pause:3.8镜像

  • 拉取镜像

缺少的这个镜像我提前推倒内网harbor了

ctr images pull harbocto.boe.com.cn/kubernetes/pause:3.8
  • 打tag
ctr images tag harbocto.boe.com.cn/kubernetes/pause:3.8 registry.k8s.io/pause:3.8
  • 查看结果
[root@cto-gpu-pro-m01 ~]# crictl images
IMAGE                                                    TAG                 IMAGE ID            SIZE
......
harbocto.boe.com.cn/kubernetes/pause                     3.8                 4873874c08efc       309kB
registry.k8s.io/pause                                    3.8                 4873874c08efc       309kB
......

5. 集群初始化

5.1 主机名

  • master-01
hostname k8s-master-01
echo "hostname k8s-master-01" > /etc/hostnamecat >> /etc/hosts <<EOF 
10.10.239.155 k8s-master-01
10.10.239.155 k8s-master-02
10.10.239.156 k8s-master-03
EOF
  • master-02
hostname k8s-master-02
echo "hostname k8s-master-02" > /etc/hostnamecat >> /etc/hosts <<EOF 
10.10.239.150 k8s-master-01
10.10.239.155 k8s-master-02
10.10.239.156 k8s-master-03
EOF
  • master-03
hostname k8s-master-04
echo "hostname k8s-master-04" > /etc/hostnamecat >> /etc/hosts <<EOF 
10.10.239.150 k8s-master-01
10.10.239.155 k8s-master-02
10.10.239.156 k8s-master-03
EOF

5.2 初始化

1)master-01

  • master 1
kubeadm init \--control-plane-endpoint "10.10.239.150:7443" \--upload-certs \--image-repository registry.aliyuncs.com/google_containers \--kubernetes-version v1.23.17 \--pod-network-cidr 10.244.0.0/16
  • 输出
Your Kubernetes control-plane has initialized successfully!To start using your cluster, you need to run the following as a regular user:mkdir -p $HOME/.kubesudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/configsudo chown $(id -u):$(id -g) $HOME/.kube/configAlternatively, if you are the root user, you can run:export KUBECONFIG=/etc/kubernetes/admin.confYou should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:https://kubernetes.io/docs/concepts/cluster-administration/addons/You can now join any number of the control-plane node running the following command on each as root:kubeadm join 10.10.239.150:7443 --token 6877nh.cjqvl57r45g3pygo \--discovery-token-ca-cert-hash sha256:86774076430c354eb6114d703c5e05afdfbd1a2270edcd7b51117feb961719c9 \--control-plane --certificate-key 95555619210539f09ad585dd1a19ecbf8326180fd91a0827173b2339576c6adcPlease note that the certificate-key gives access to cluster sensitive data, keep it secret!
As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use
"kubeadm init phase upload-certs --upload-certs" to reload certs afterward.Then you can join any number of worker nodes by running the following on each as root:kubeadm join 10.10.239.150:7443 --token 6877nh.cjqvl57r45g3pygo \--discovery-token-ca-cert-hash sha256:86774076430c354eb6114d703c5e05afdfbd1a2270edcd7b51117feb961719c9
  • kubectl 配置环境(按上边输出操作即可)
mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config

2)其他master

  • 按上边的输出执行命令
  kubeadm join 10.10.239.150:7443 --token 6877nh.cjqvl57r45g3pygo \--discovery-token-ca-cert-hash sha256:86774076430c354eb6114d703c5e05afdfbd1a2270edcd7b51117feb961719c9 \--control-plane --certificate-key 95555619210539f09ad585dd1a19ecbf8326180fd91a0827173b2339576c6adc
  • kubectl 配置环境
mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config

3)node节点

kubeadm join 10.10.239.150:7443 --token 6877nh.cjqvl57r45g3pygo \--discovery-token-ca-cert-hash sha256:86774076430c354eb6114d703c5e05afdfbd1a2270edcd7b51117feb961719c9

4) 检查

  • 查看节点
root@k8s-master-01:~# kubectl get node -n kube-system
NAME            STATUS     ROLES                  AGE   VERSION
k8s-master-01   NotReady   control-plane,master   20m   v1.23.17
k8s-master-02   NotReady   control-plane,master   11m   v1.23.17
k8s-master-03   NotReady   control-plane,master   10m   v1.23.17

NotReady是因为我们没有设置状态

  • 查看kube-system中pod
root@k8s-master-01:~# kubectl get pod -n kube-system
NAME                                    READY   STATUS    RESTARTS      AGE
coredns-6d8c4cb4d-flqtp                 0/1     Pending   0             20m
coredns-6d8c4cb4d-w8tc8                 0/1     Pending   0             20m
etcd-k8s-master-01                      1/1     Running   0             20m
etcd-k8s-master-02                      1/1     Running   0             11m
etcd-k8s-master-03                      1/1     Running   0             10m
kube-apiserver-k8s-master-01            1/1     Running   0             20m
kube-apiserver-k8s-master-02            1/1     Running   0             12m
kube-apiserver-k8s-master-03            1/1     Running   1 (10m ago)   10m
kube-controller-manager-k8s-master-01   1/1     Running   1 (11m ago)   20m
kube-controller-manager-k8s-master-02   1/1     Running   0             12m
kube-controller-manager-k8s-master-03   1/1     Running   0             9m53s
kube-proxy-2xnjx                        1/1     Running   0             11m
kube-proxy-jftx5                        1/1     Running   0             20m
kube-proxy-zpxv8                        1/1     Running   0             12m
kube-scheduler-k8s-master-01            1/1     Running   1 (11m ago)   20m
kube-scheduler-k8s-master-02            1/1     Running   0             12m
kube-scheduler-k8s-master-03            1/1     Running   0             9m45s

5.3 网络安装

有很多选择,
一般小集群我选择 flannel,见 《flannel网络的安装和删除》
大的集群选择calico,见《calico网络安装和删除》

6. storageclass 的安装

  • 安装
    见文档 《K8S对象-StorageClass》
  • FAQ
    《【FAQ】1.21创建PV报错》

在这里插入图片描述

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

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

相关文章

PnP(Perspective-n-Point)算法 | 用于求解已知n个3D点及其对应2D投影点的相机位姿

什么是PnP算法&#xff1f; PnP 全称是 Perspective-n-Point&#xff0c;中文叫“n点透视问题”。它的目标是&#xff1a; 已知一些空间中已知3D点的位置&#xff08;世界坐标&#xff09;和它们对应的2D图像像素坐标&#xff0c;求解摄像机的姿态&#xff08;位置和平移&…

QT-JSON

#include <QJsonDocument>#include <QJsonObject>#include <QJsonArray>#include <QFile>#include <QDebug>void createJsonFile() {// 创建一个JSON对象 键值对QJsonObject jsonObj;jsonObj["name"] "John Doe";jsonObj[…

解决各个系统报错TDengine:no taos in java.library.path问题

windows 系统解决办法 在本地上安装一个TD的Windows客户端&#xff0c;注意安装的客户端版本一定要和服务端TD版本完全一致。&#xff08;或者将 C:\TDengine\driver\taos.dll 拷贝到 C:\Windows\System32\ 目录下&#xff09; 客户端各个历史版本下载链接&#xff1a;TDengin…

我提出结构学习的思路,意图用结构学习代替机器学习

我提出结构学习的思路&#xff0c;意图用结构学习代替机器学习 1.机器学习的本质和缺点 机器学习的规律是设计算法、用数据训练算法、让算法学会产生正确的数据回答问题&#xff0c;其缺点在于&#xff0c;需要大规模训练数据和巨大算力还其次&#xff0c;机器学习不能产生智…

【Hive 运维实战】一键管理 Hive 服务:Metastore 与 HiveServer2 控制脚本开发与实践

一、引言 在大数据开发中&#xff0c;Hive 作为重要的数据仓库工具&#xff0c;其核心服务metastore&#xff08;元数据服务&#xff09;和hiveserver2&#xff08;查询服务&#xff09;的启停管理是日常运维的基础操作。手动执行命令启停服务不仅效率低下&#xff0c;还容易因…

简历制作要精而不简

不得不说&#xff0c;不管是春招&#xff0c;还是秋招&#xff0c;我们在求职时&#xff0c;第一步便是制作一份简历。不得不承认&#xff0c;好的简历&#xff0c;就像一块敲门砖&#xff0c;能让面试官眼前一亮&#xff0c;让应聘成功的概率增添一分。 对于一个初次求职者来…

深入Java8-日期时间API:TemporalQuery、TemporalQueries类

JDK版本&#xff1a;11 TemporalQuery FunctionalInterface public interface TemporalQuery<R> {R queryFrom(TemporalAccessor temporal); } emporalQuery是Java 8中用于时间查询的一个函数式接口&#xff0c;它允许用户对日期和时间进行查询。TemporalQuery接口中定…

Spring Boot + MyBatis 实现的简单用户管理项目的完整目录结构示例

&#x1f4c1; 示例项目结构&#xff08;基于 Maven&#xff09; user-management/ ├── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── com/example/usermanagement/ │ │ │ ├── controller/ │ │ │ │ └── UserC…

嵌入式RTC工作原理及应用场景

20ppm 是衡量 RTC&#xff08;实时时钟&#xff09;精度的关键指标&#xff0c;表示 每百万秒&#xff08;约11.57天&#xff09;的最大时间误差范围。以下是通俗易懂的解释&#xff1a; 1. ppm 的含义 ppm Parts Per Million&#xff08;百万分之一&#xff09; 1 ppm 1/1,…

[Godot][游戏开发] 如何在 Godot 中配置 Android 环境(适配新版 Android Studio)

在使用 Godot 进行 Android 项目的开发与导出时&#xff0c;配置 Android 环境是一项必要步骤。随着 Android Studio 的更新&#xff08;特别是自 Arctic Fox 版本起&#xff09;&#xff0c;安装方式发生了变化&#xff0c;默认不再引导用户手动配置 SDK/JDK/NDK&#xff0c;而…

量子语言模型——where to go

1️⃣ 在大语言模型&#xff08;LLM&#xff09;高度发达的今天&#xff0c;还研究这些小模型&#xff08;如n-gram、RNN、量子语言模型&#xff09;是否有意义&#xff1f; ✅ 有意义&#xff0c;但意义已经转变了——不再是用于「直接生产 SOTA 应用」&#xff0c;而是&…

机电的焊接技术

焊接技术:高温或高压条件下,使用焊接材料(焊条或焊丝)将两块或两块以上的母材(待焊接的工件)连接 成一个整体的操作方法&#xff61; 2.3.1 焊接设备和焊接材料的分类及选用 1.焊接设备&#xff08;对应焊接方法&#xff09; 2.焊接材料&#xff08;焊条、焊丝、焊剂、焊接气…

深入解析Vue.js:构建现代Web应用的高效之道

一、Vue.js 的核心设计理念 Vue.js 以渐进式框架为定位,强调轻量灵活与易上手性,允许开发者根据项目需求逐步引入核心功能或扩展模块。其核心设计遵循以下原则: 响应式数据绑定:通过数据劫持(Object.defineProperty/Proxy)和发布 - 订阅模式,实现视图与数据的自动同步,…

信贷特征分析可视化函数(外置指标面板完整版)

XY的基础处理 target_column[SeriousDlqin2yrs] feature_columns[RevolvingUtilizationOfUnsecuredLines, age,NumberOfTime30-59DaysPastDueNotWorse, DebtRatio, MonthlyIncome,NumberOfOpenCreditLinesAndLoans, NumberOfTimes90DaysLate,NumberRealEstateLoansOrLines, Nu…

ESP32-idf学习(三)esp32C3连接iot

一、前言 上一篇用蓝牙作为通信方式&#xff0c;虽然勉强完成了控制&#xff0c;但结果显然不是那么符合我们的预期&#xff0c;既然用蓝牙还需要研究一段时间&#xff0c;那我们就先整一些现成的&#xff0c;不需要研究的&#xff01;iot云平台&#xff01;这里当然也是通过w…

Axure RP11安装、激活、汉化

一:注册码 Axure RP11.0.0.4122在2025-5-29日亲测有效: 49bb9513c40444b9bcc3ce49a7a022f9

高光谱成像相机:基于高光谱成像技术的玉米种子纯度检测研究

种子纯度是衡量种子质量的核心指标之一&#xff0c;直接影响农作物产量与品质。传统检测方法&#xff08;如形态学观察、生化分析&#xff09;存在耗时长、破坏样本、依赖人工等缺陷。近年来&#xff0c;高光谱成像技术因其融合光谱与图像信息的优势&#xff0c;成为无损检测领…

Excel 中的TEXTJOIN用法(基础版),将Excel 多个单元格内容按条件合并到一个单元格

1.新建一张数据透视表 选择你需要的维度所在的列 2.点击确定生成&#xff0c;勾选右边的维度 3.选中单元格&#xff0c;通过 ShiftF3 查看函数参数 第一个参数&#xff1a;分隔符&#xff0c;用来分隔合并的文本&#xff0c;不需要分隔用"" 第二个参数&#xff1a;…

2025.05.28【Choropleth】群体进化学专用图:区域数据可视化

Load geospatial data Start by loading your geospatial data in R, and build a basic plot. Data from the package The cartography comes with a set of geospatial data included. Learn how to use it to build a choropleth map. 文章目录 Load geospatial dataData …

QT-Creator安装教程(windows)

目录 1,下载 1.1 镜像源下载 1.2 运行下载的exe文件 1.2.1 QT5 版本安装 1.2.2 QT6 版本安装 1.2.3 如何在安装完成之后,继续添加扩展包 1,下载 1.1 镜像源下载 地址:Index of /qtproject/