k8s 集群安装

安装rockylinux

https://www.jianshu.com/p/a5fe20318b8e

https://www.cnblogs.com/haoee/p/18290506

配置VirtualBox双网卡

https://www.cnblogs.com/ShineLeBlog/p/17580311.html

https://zhuanlan.zhihu.com/p/341328334

https://blog.csdn.net/qq_36544785/article/details/135352652

VirtualBox-Linux系统安装增强功能

https://www.cnblogs.com/liu-ke/p/5007840.html

yum install -y kernel-headers kernel-devel gcc* make
yum update -y
mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
./VBoxLinuxAdditions.run

k8s 安装

https://www.cnblogs.com/eilen6316/p/18449627
https://blog.csdn.net/m0_51510236/article/details/134142834
https://devpress.csdn.net/k8s/66c981447648734c1b1675d7.html
https://developer.aliyun.com/article/1399779
https://blog.csdn.net/m0_51964671/article/details/135256434
https://developer.aliyun.com/article/1478417

1、yum install -y bash-completion

2、vi ~/.bashrc 添加source <(kubectl completion bash)

3、source ~/.bashrc

远程连接工具WindTerm_2.6.1

tls: failed to verify certificate: x509: certificate signed by unknown authority问题加-k参数

ctr -n=k8s.io images pull registry.aliyuncs.com/google_containers/kube-apiserver:v1.28.0 -k
ctr -n=k8s.io images pull registry.aliyuncs.com/google_containers/kube-controller-manager:v1.28.0 -k
ctr -n=k8s.io images pull registry.aliyuncs.com/google_containers/kube-scheduler:v1.28.0 -k
ctr -n=k8s.io images pull registry.aliyuncs.com/google_containers/kube-proxy:v1.28.0 -k
ctr -n=k8s.io images pull registry.aliyuncs.com/google_containers/pause:3.9 -k
ctr -n=k8s.io images pull registry.aliyuncs.com/google_containers/etcd:3.5.9-0 -k
ctr -n=k8s.io images pull registry.aliyuncs.com/google_containers/coredns:v1.10.1 -k

kubeadm.yaml

apiVersion: kubeadm.k8s.io/v1beta3
bootstrapTokens:
- groups:
  - system:bootstrappers:kubeadm:default-node-token
  token: abcdef.0123456789abcdef
  ttl: 24h0m0s
  usages:
  - signing
  - authentication
kind: InitConfiguration
#localAPIEndpoint:
#  advertiseAddress: 1.2.3.4
#  bindPort: 6443
nodeRegistration:
  criSocket: unix:///run/containerd/containerd.sock
  imagePullPolicy: IfNotPresent
#  name: node
  taints: null
---
apiServer:
  timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta3
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controllerManager: {}
dns: {}
etcd:
  local:
    dataDir: /var/lib/etcd
imageRepository: registry.aliyuncs.com/google_containers
kind: ClusterConfiguration
kubernetesVersion: 1.28.0
controlPlaneEndpoint: "192.168.56.116:6443"
networking:
  dnsDomain: cluster.local
  serviceSubnet: 10.96.0.0/12
  podSubnet: 10.244.0.0/12
scheduler: {}
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: ipvs
---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
cgroupDriver: systemd

ctr image pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/calico/cni:v3.25.0 -y
ctr image pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/calico/pod2daemon-flexvol:v3.25.0 -y
ctr image pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/calico/node:v3.25.0 -y
ctr image pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/calico/kube-controllers:v3.25.0 -y
ctr image pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/calico/typha:v3.25.0 -y
相关推荐
wuxingge4 小时前
k8s1.30.0高可用集群部署
云原生·容器·kubernetes
志凌海纳SmartX5 小时前
趋势洞察|AI 能否带动裸金属 K8s 强势崛起?
云原生·容器·kubernetes
锅总5 小时前
nacos与k8s service健康检查详解
云原生·容器·kubernetes
Code_Artist6 小时前
Docker镜像加速解决方案:配置HTTP代理,让Docker学会科学上网!
docker·云原生·容器
何遇mirror6 小时前
云原生基础-云计算概览
后端·云原生·云计算
颜淡慕潇7 小时前
【K8S系列】kubectl describe pod显示ImagePullBackOff,如何进一步排查?
后端·云原生·容器·kubernetes
Linux运维日记8 小时前
k8s1.31版本最新版本集群使用容器镜像仓库Harbor
linux·docker·云原生·容器·kubernetes
一名路过的小码农9 小时前
ceph 18.2.4二次开发,docker镜像制作
ceph·docker·容器
AI_小站10 小时前
RAG 示例:使用 langchain、Redis、llama.cpp 构建一个 kubernetes 知识库问答
人工智能·程序人生·langchain·kubernetes·llama·知识库·rag