使用kubeadm安装kubernetes

这是一种最快的方法向你展示如何简单在在你Ubuntu16.04或者Centos的机器的安装Kubernetes。这次使用的安装工具是Kubernetes1.4组件叫做kubeadm。
Kubernetes可以工作在本地虚拟机,物理服务器或者云服务器。Kubernetes简单到一体化傻瓜部署。
简单到翻墙倒是部署Kubernetes最难的一步了。
先翻墙吧,不然是个极其痛苦的过程。全程翻墙操作!!!
翻墙传送门
安装之中难免出现小问题,按部就班,解决不了,文章附录我自己遇到的问题和解决方案,可供参考:

安装要求:

1.一台或者多台装有Ubuntu 16.04 or CentOS 7的电脑或者虚拟机。
2.至少1GB RAM
3.公网或者内网可联通

安装步骤

(1/ 4):在你的主机上安装kubelet和kubeadm
我们将会安装下面几个包:

docker: the container runtime, which Kubernetes depends on.

kubelet: the most core component of Kubernetes. It runs on    all of the machines in your cluster and does things like     starting pods and containers.

kubectl: the command to control the cluster once it’s running. You will only use this on the master.

kubeadm: the command to bootstrap the cluster.

在你拥有的每台机器上进行如下操作:
使用ssh登陆你的机器,并获得root权限(su root)
在Ubuntu16.04:

# curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
# cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
# apt-get update
# apt-get install -y docker.io kubelet kubeadm kubectl kubernetes-cni

在CentOS7:

# cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
       https://packages.cloud.google
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值