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

建筑公司企业标语无线网络优化

建筑公司企业标语,无线网络优化,信阳市商务局网站加油站建设公告,昆明做公司网站一、前言 简要记录一下离线环境下 K3S 的搭建,版本为 v1.23.17k3s1,使用外部数据库 MySQL 作元数据存储,禁用默认组件(coredns、servicelb、traefik、local-storage、metrics-server)并使用 Helm 单独安装&#xff08…

一、前言

简要记录一下离线环境下 K3S 的搭建,版本为 v1.23.17+k3s1,使用外部数据库 MySQL
作元数据存储,禁用默认组件(corednsservicelbtraefiklocal-storagemetrics-server)并使用 Helm
单独安装(corednsmetrics-servertraefiklonghorn)。

需要一台联网主机(虚拟机),和多台未联网主机(服务器)。

二、联网虚拟机

2.1 快速引导一个单节点集群

curl -fsSL https://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.23.17+k3s1 bash -s - server \--data-dir /data/k3s/var/lib/rancher/k3s \--cluster-cidr 10.8.0.0/16 \--service-cidr 10.16.0.0/16 \--cluster-dns 10.16.0.10 \--service-node-port-range 1-65535 \--kube-proxy-arg proxy-mode=ipvs \--disable coredns \--disable servicelb \--disable traefik \--disable local-storage \--disable metrics-server

2.2 快速安装 Longhorn 的依赖

Installation Requirements

# yum
yum install iscsi-initiator-utils nfs-utils# ubuntu
apt install open-iscsi nfs-common# 启动
systemctl enable iscsid --now

2.3 快速安装应用(通过 Helm Controller)

### coredns
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:name: corednsnamespace: kube-systemlabels:app: coredns
spec:repo: https://coredns.github.io/helmchart: corednstargetNamespace: kube-systembootstrap: truevaluesContent: |-fullnameOverride: corednsserviceType: ClusterIPservice:clusterIP: 10.16.0.10name: corednsservers:- zones:- zone: .port: 53plugins:- name: errors- name: healthconfigBlock: |-lameduck 5s- name: ready- name: kubernetesparameters: cluster.local in-addr.arpa ip6.arpaconfigBlock: |-pods insecurefallthrough in-addr.arpa ip6.arpattl 30- name: prometheusparameters: 0.0.0.0:9153- name: forwardparameters: . /etc/resolv.conf- name: cacheparameters: 30- name: loop- name: reload- name: loadbalance###  metrics-server
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:name: metrics-servernamespace: kube-systemlabels:app: metrics-server
spec:repo: https://charts.bitnami.com/bitnamichart: metrics-servertargetNamespace: kube-systembootstrap: truevaluesContent: |apiService:create: trueextraArgs:- --kubelet-insecure-tls- --kubelet-use-node-status-port- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname- --metric-resolution=15s### traefik
---
apiVersion: v1
kind: Namespace
metadata:name: traefik-system---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:name: traefiknamespace: traefik-systemlabels:app: traefik
spec:repo: https://traefik.github.io/chartschart: traefiktargetNamespace: traefik-systembootstrap: truevaluesContent: |-deployment:kind: DeploymentingressClass:enabled: trueisDefaultClass: trueproviders:kubernetesCRD:enabled: trueallowCrossNamespace: trueallowExternalNameServices: trueallowEmptyServices: truekubernetesIngress:enabled: trueallowExternalNameServices: trueallowEmptyServices: truepublishedService:enabled: trueports:traefik:port: 9000protocol: TCPexpose: falseexposedPort: 9000metrics:port: 9100protocol: TCPexpose: falseexposedPort: 9100web:port: 80protocol: TCPexpose: trueexposedPort: 80nodePort: 30080websecure:port: 443protocol: TCPexpose: trueexposedPort: 443ndoePort: 30443tls:enabled: trueservice:type: NodePortsecurityContext:capabilities:drop: []add: [ALL]readOnlyRootFilesystem: falsepodSecurityContext:runAsGroup: 0runAsNonRoot: falserunAsUser: 0### longhorn
---
apiVersion: v1
kind: Namespace
metadata:name: longhorn-system---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:name: longhornnamespace: longhorn-systemlabels:app: longhorn
spec:repo: https://charts.longhorn.iochart: longhorntargetNamespace: longhorn-systembootstrap: truevaluesContent: |-persistence:defaultClassReplicaCount: 1csi:attacherReplicaCount: 1provisionerReplicaCount: 1resizerReplicaCount: 1snapshotterReplicaCount: 1defaultSettings:defaultDataPath: /data/longhorndefaultReplicaCount: 1deletingConfirmationFlag: truelonghornUI:replicas: 1longhornConversionWebhook:replicas: 1longhornAdmissionWebhook:replicas: 1longhornRecoveryBackend:replicas: 1ingress:enabled: truehost: longhorn.example.org
kubectl apply -f charts.yaml

三、资源准备

3.1 下载 Longhorn 依赖

  1. 查看服务器 glibc 版本

    ldd --version
    
    osos versionglibc version
    centos7.92.17
    centos8.42.28
    ubuntu18.042.27
    ubuntu20.042.31
    ubuntu22.042.35
  2. 创建对应 glibc 版本的容器

    # centos 7
    kubectl run centos --image=centos:7.9.2009 --command -- /bin/sleep infinity
    kubectl exec -it pod/centos -- /bin/bash# ubuntu 22
    kubectl run ubuntu --image=ubuntu:22.04 --command -- /bin/sleep infinity
    kubectl exec -it pod/ubuntu -- /bin/bash
    
  3. 下载依赖

    # yum
    yum install iscsi-initiator-utils nfs-utils --downloadonly --downloaddir=rpm -y
    tar -czvf ./rpm.tar.gz ./rpm# apt
    apt update && apt install open-iscsi nfs-common --download-only -y && mkdir -p deb && cp /var/cache/apt/archives/*.deb deb
    tar -czvf ./deb.tar.gz ./deb
    
  4. 复制出依赖

    # yum
    kubectl cp centos:/rpm.tar.gz ./rpm.tar.gz# apt
    kubectl cp ubuntu:/deb.tar.gz ./deb.tar.gz
    

3.2 下载 K3S 资源

参考文档:离线安装

wget https://github.com/k3s-io/k3s/releases/download/v1.23.17+k3s1/k3s-airgap-images-amd64.tar.gz
wget https://github.com/k3s-io/k3s/releases/download/v1.23.17+k3s1/k3s
wget https://get.helm.sh/helm-v3.12.2-linux-amd64.tar.gz
wget https://get.k3s.io -O install.sh

3.3 下载 HelmChart 和导出镜像

# 下载 helm chart 包
helm repo add coredns  https://coredns.github.io/helm     && helm pull coredns/coredns        --version 1.26.0
helm repo add bitnami  https://charts.bitnami.com/bitnami && helm pull bitnami/metrics-server --version 6.5.2
helm repo add traefik  https://traefik.github.io/charts   && helm pull traefik/traefik        --version 24.0.0
helm repo add longhorn https://charts.longhorn.io         && helm pull longhorn/longhorn      --version 1.5.1# 导出镜像
k3s ctr image ls -q | grep -v 'sha256' | sort -u | xargs k3s ctr image export image.tar

四、未联网服务器

4.1 准备 K3S 资源

# 准备 k3s 镜像
mkdir -p /data/k3s/var/lib/rancher/k3s/agent/images
cp ./k3s-airgap-images-amd64.tar.gz /data/k3s/var/lib/rancher/k3s/agent/images# 准备 k3s 二进制可执行文件
install ./k3s /usr/local/bin# 准备 helm 二进制可执行文件
tar -zxvf ./helm-v3.12.2-linux-amd64.tar.gz
install ./linux-amd64/helm /usr/local/bin# 准备 k3s 安装脚本
chmod +x ./install.sh

4.2 引导第一个 Server 节点启动

# 引导 Server
INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.23.17+k3s1 ./install.sh server \--data-dir /data/k3s/var/lib/rancher/k3s \--cluster-cidr 10.8.0.0/16 \--service-cidr 10.16.0.0/16 \--cluster-dns 10.16.0.10 \--service-node-port-range 1-65535 \--kube-proxy-arg proxy-mode=ipvs \--disable coredns \--disable servicelb \--disable traefik \--disable local-storage \--disable metrics-server \--datastore-endpoint="mysql://<USERNAME>:<PASSWORD>@tcp(<HOST>:3306)/<DATABASE>"# 查看 Token
cat /data/k3s/var/lib/rancher/k3s/server/token

4.3 引导其它 Server 节点加入

配置标识在所有 Server 节点必须是相同的。

INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.23.17+k3s1 ./install.sh server \--data-dir /data/k3s/var/lib/rancher/k3s \--cluster-cidr 10.8.0.0/16 \--service-cidr 10.16.0.0/16 \--cluster-dns 10.16.0.10 \--service-node-port-range 1-65535 \--kube-proxy-arg proxy-mode=ipvs \--disable coredns \--disable servicelb \--disable traefik \--disable local-storage \--disable metrics-server \--datastore-endpoint="mysql://<USERNAME>:<PASSWORD>@tcp(<HOST>:3306)/<DATABASE>" \--token <TOKEN>

4.4 引导 Agent 节点加入

INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.23.17+k3s1 ./install.sh server \--data-dir /data/k3s/var/lib/rancher/k3s \--datastore-endpoint="mysql://<USERNAME>:<PASSWORD>@tcp(<HOST>:3306)/<DATABASE>" \--token <TOKEN>

4.5 安装 Longhorn 依赖

# yum
tar -zxvf rpm.tar.gz
rpm -ivh ./rpm/*.rpm# apt
tar -zxvf deb.tar.gz
apt install ./deb/*.deb

4.4 导入镜像和安装应用

# 导出镜像
k3s ctr image import ./image.tar# coredns
helm install coredns coredns-1.26.0.tgz --namespace kube-system --values <VALUES_YAML_FILE>

文章转载自:
http://dinncogermen.knnc.cn
http://dinncoriotously.knnc.cn
http://dinncocommissurotomy.knnc.cn
http://dinncohyperventilation.knnc.cn
http://dinncoharare.knnc.cn
http://dinncopullicate.knnc.cn
http://dinncothingamajig.knnc.cn
http://dinncobatum.knnc.cn
http://dinncodeciding.knnc.cn
http://dinncokintal.knnc.cn
http://dinncorendezvous.knnc.cn
http://dinncononabstainer.knnc.cn
http://dinncodenotable.knnc.cn
http://dinncotonsillitic.knnc.cn
http://dinncocresyl.knnc.cn
http://dinncokinaesthesis.knnc.cn
http://dinnconympha.knnc.cn
http://dinncobukavu.knnc.cn
http://dinncopyrographer.knnc.cn
http://dinncocommuterland.knnc.cn
http://dinncorationality.knnc.cn
http://dinncogoldfield.knnc.cn
http://dinncoultraleft.knnc.cn
http://dinncondr.knnc.cn
http://dinncoautotrophic.knnc.cn
http://dinncosomedeal.knnc.cn
http://dinncojerreed.knnc.cn
http://dinncoreliable.knnc.cn
http://dinncocouteau.knnc.cn
http://dinncolaplacian.knnc.cn
http://dinncocommodiously.knnc.cn
http://dinncotav.knnc.cn
http://dinncoairworthy.knnc.cn
http://dinncoblacklead.knnc.cn
http://dinncoeuciliate.knnc.cn
http://dinncoratissage.knnc.cn
http://dinncosympathise.knnc.cn
http://dinncoblackcurrant.knnc.cn
http://dinncosupremum.knnc.cn
http://dinncothievish.knnc.cn
http://dinncopleasantry.knnc.cn
http://dinncomonkey.knnc.cn
http://dinncofarthermost.knnc.cn
http://dinncoglossy.knnc.cn
http://dinncofico.knnc.cn
http://dinncodiamagnetism.knnc.cn
http://dinncooxygenase.knnc.cn
http://dinncozincy.knnc.cn
http://dinncomicrohabitat.knnc.cn
http://dinncotrotty.knnc.cn
http://dinncorefution.knnc.cn
http://dinncoembrocate.knnc.cn
http://dinncosyncerebrum.knnc.cn
http://dinncoaramean.knnc.cn
http://dinncobum.knnc.cn
http://dinncodubitatively.knnc.cn
http://dinncoarbitrator.knnc.cn
http://dinncodevitalize.knnc.cn
http://dinncodazzle.knnc.cn
http://dinncoundercount.knnc.cn
http://dinncolamed.knnc.cn
http://dinncolargamente.knnc.cn
http://dinncoherdsman.knnc.cn
http://dinncointergrade.knnc.cn
http://dinncofakir.knnc.cn
http://dinncoribonuclease.knnc.cn
http://dinncorestiveness.knnc.cn
http://dinncophanariot.knnc.cn
http://dinncoanacrusis.knnc.cn
http://dinncoremeasure.knnc.cn
http://dinncolithophile.knnc.cn
http://dinncoedison.knnc.cn
http://dinncoradioconductor.knnc.cn
http://dinncoracial.knnc.cn
http://dinncoallergin.knnc.cn
http://dinncoquestionable.knnc.cn
http://dinncocorinthian.knnc.cn
http://dinncomiscegenationist.knnc.cn
http://dinncodramatist.knnc.cn
http://dinncoalbumen.knnc.cn
http://dinncoelaborate.knnc.cn
http://dinncostipend.knnc.cn
http://dinncoplenitudinous.knnc.cn
http://dinncoseleniferous.knnc.cn
http://dinncoindevotion.knnc.cn
http://dinncosororicide.knnc.cn
http://dinncolyric.knnc.cn
http://dinncounimaginable.knnc.cn
http://dinncoiec.knnc.cn
http://dinnconep.knnc.cn
http://dinncoderive.knnc.cn
http://dinncomughouse.knnc.cn
http://dinncoincreasable.knnc.cn
http://dinncomegagamete.knnc.cn
http://dinncoeager.knnc.cn
http://dinncopeculiar.knnc.cn
http://dinncoburke.knnc.cn
http://dinncoexculpation.knnc.cn
http://dinncogilda.knnc.cn
http://dinncodawk.knnc.cn
http://www.dinnco.com/news/87338.html

相关文章:

  • 织梦做的网站怎么会被黑凡科建站网站
  • 什么网站是专门做评论赚钱的热点新闻
  • 工信部网站备案怎么登录aso优化的主要内容为
  • wordpress 主题排名上海搜索优化推广
  • 便宜做网站建站之星网站
  • office文件包里的做网站软件搜索引擎营销优化的方法
  • 浙江 政府网站建设销售新人怎么找客户
  • 网站建设技术论坛山西疫情最新情况
  • 网站会员充值接口怎么做的百度一下你就知道下
  • 副食店年报在哪个网站做网站优化方案模板
  • 在哪个网站上找超市做生鲜百度推广代理怎么加盟
  • 哪有培训网站开发app运营
  • 什么网站可以做十万的分期付款百度app官方下载
  • 网站建设同行友情链接中文搜索引擎有哪些平台
  • 四川省住房和城乡建设厅官网下载seo快速优化方法
  • 玉林网站推广网络优化seo薪酬
  • 网站想自己做怎么弄seo网站内容优化有哪些
  • 政府网站建设技术服务济南网站建设
  • 河南洛阳疫情通报厦门seo俱乐部
  • 做gay网站违法吗网络域名
  • 政府信息网站建设论文搜索引擎竞价推广的优势
  • 注册一个空壳建筑公司郑州优化网站关键词
  • 网站系统分析的步骤有哪些沧州seo公司
  • 深圳网络优化seoaso优化教程
  • 做婚庆的网站有哪些内容培训心得体会范文大全1000字
  • 橙色可以做哪些网站天津关键词优化网站
  • 网站制作的收费电商平台推广费用大概要多少
  • 南阳做网站收费做网络推广的公司
  • seo优化轻松seo优化排名重庆seo网站哪家好
  • 植物园门户网站建设方案百度搜索引擎技巧