Kubernetes基础集群部署

本文档详细介绍了如何部署Kubernetes基础集群,包括Etcd的安装与配置,Master和Node节点的Kubernetes安装,Flannel网络配置,以及将Master设置为镜像仓库的步骤。
摘要由CSDN通过智能技术生成

Kubernetes 基础集群部署

1. 安装Etcd:

1.1 使用yum安装

[root@k8s-master ~]# yum install etcd -y

1.2 修改/etc/kubernetes/apiserver 配置文件

[root@k8s-master ~]# vim /etc/etcd/etcd.conf 
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"
ETCD_ADVERTISE_CLIENT_URLS="http://10.0.0.100:2379"

1.3 启动etcd服务及检查

[root@k8s-master ~]# systemctl enable etcd.service 
Created symlink from /etc/systemd/system/multi-user.target.wants/etcd.service to /usr/lib/systemd/system/etcd.service.
[root@k8s-master ~]# systemctl start etcd.service        
[root@k8s-master ~]# netstat -lntup
[root@k8s-master ~]# etcdctl -C http://10.0.0.100:2379 cluster-health
member 8e9e05c52164694d is healthy: got healthy result from http://10.0.0.100:2379
cluster is healthy

2379端口是用来对外提供的服务的。
2380端口是集群节点之间相互同步数据的。

2. Master节点安装Kubernetes

2.1 使用yum安装

[root@k8s-master ~]# yum install kubernetes-master.x86_64 -y

2.2 修改/etc/kubernetes/apiserver 配置文件

[root@k8s-master ~]# vim /etc/kubernetes/apiserver 
KUBE_API_A
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值