首页
技术小册
AIGC
面试刷题
技术文章
MAGENTO
云计算
视频课程
源码下载
PDF书籍
「涨薪秘籍」
登录
注册
第一章:说明
第二章:节点配置
2.1. 工具准备
2.2. CheckList
2.2.1. 确保禁用swap分区
2.2.2. 确保mac地址唯一
2.2.3. 确保product_uuid唯一
2.2.4. 确保关闭防火墙
2.2.5. 确保时区准确,时间同步服务开启
2.2.6. 配置内核参数
2.2.7. 开启ipvs和br_netfilter内核模块
第三章:安装依赖服务
3.1. 部署Nginx LB
3.2. 部署containerd
3.2.1. 部署containerd服务端
3.2.2. 配置crictl客户端
第四章:部署Kubernetes
4.1. 安装集群
4.1.1. 配置主机名解析
4.1.2. 安装二进制文件
4.1.3. 初始化控制平面
4.1.4. 初始化数据平面
4.1.5. 配置kube-proxy为ipvs模式
4.1.6. 验证集群状态
4.2. 部署插件和必要服务
4.2.1. 部署CNI插件
4.2.2. 部署ingress controller
4.2.3. 部署metrics-server
4.2.4. 安装kubernetes-dashboard
4.2.5. 安装nfs-storage-class
当前位置:
首页>>
技术小册>>
Kubernetes合辑1-安装Kubernetes
小册名称:Kubernetes合辑1-安装Kubernetes
``` [root@master-81 ~]# kubeadm init --control-plane-endpoint "10.4.7.80:6443" --pod-network-cidr 10.200.0.0/16 --service-cidr 10.100.0.0/16 --image-repository registry.aliyuncs.com/google_containers --upload-certs --apiserver-cert-extra-sans k8s-local-01.huanle.com --apiserver-cert-extra-sans k8s-local.huanle.com 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/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config Alternatively, if you are the root user, you can run: export KUBECONFIG=/etc/kubernetes/admin.conf You 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.4.7.80:6443 --token uyl0l1.j6a6b6bng2ofacnd \ --discovery-token-ca-cert-hash sha256:8d53c43c27b24cd882683e53a6be0e21a7d59b0bc4e70feee0244a2a60c61b1c \ --control-plane --certificate-key 493949abeee92288565f34526541dece387aa23ac4c58d1fecebd55de02a5426 Please 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.4.7.80:6443 --token uyl0l1.j6a6b6bng2ofacnd \ --discovery-token-ca-cert-hash sha256:8d53c43c27b24cd882683e53a6be0e21a7d59b0bc4e70feee0244a2a60c61b1c ```
上一篇:
4.1.2. 安装二进制文件
下一篇:
4.1.4. 初始化数据平面
该分类下的相关小册推荐:
Kubernetes中文教程(六)
Kubernets合辑2-部署Ingress
Kubernetes中文教程(一)
Kubernets合辑13-集群监控
Kubernets合辑7-存储
Kubernetes中文教程(三)
云原生-K8S入门实战
Kubernets合辑8-权限控制
Kubernets合辑4-kubernetes入门
Kubernets合辑5-Pod控制器
Kubernetes中文教程(五)
Kubernetes中文教程(二)