自学内容网 自学内容网

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

原文地址:https://blog.csdn.net/huangjinjin520/article/details/143930886

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!