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
繁體地址,請注明出處:http://hk.pswp.cn/pingmian/83264.shtml
英文地址,請注明出處:http://en.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/