From Hyper-V Create Ubuntu_Server To Install Docker and Kubelnets
新建
存在了一台虚拟机UbuntuServer = Master
启动node_one
click node_one for two once
Ubuntu_Server Install Begin
Enter
输入用户名
密码
Login Sucessful
input : ss- antp
确认点: SSH have Installed
input : ip addr
确认点:IP IS 192.17.197.21
WIN + R CMD 远程连接 Ubuntu Server
input: ssh [email protected]
input : yes
input : your password
确认点 : connect successful
Now Install Docker !
input : curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
input : your password
output:ok
input : sudo add-apt-repository “deb https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable”
output:
input: apt update && apt install docker-ce
–更新并安装 docker-ce 非企业版
input: docker run hello-world
output: command ‘docker’ not found
–根据提示
input: sudo apt install docker.io
output:
input:Y
Download Begin
Docker Installed
Now to test !
input : docker run hello-world
output:
–安装成功
Now Install kubernetes !
–首先配置更新源头
input: ls /etc/apt/sources.list.d
–确认目录 是否软件 kubernetes,同样作为确定安装成功/失败的手段
input : echo “deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main” | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
output:
–访问阿里云镜像成功
input : sudo gpg --keyserver keyserver.ubuntu.com --recv-keys BA07F4FB #对安装包进行签名
output:
–签名成功
input: sudo gpg --export --armor BA07F4FB | sudo apt-key add -
output:
input: sudo apt-get update
output:
input : ls /etc/apt/sources.list.d
output:
kubernetes show in list
update source sucessful !
–更新源配置成功
input :
nano /etc/fstab #永久关闭,注释掉swap那一行,推荐永久关闭
output:
–Now Step two Install kubernetes !–
–k8s 的 4个部分
input:
sudo apt-get install kubelet
output:
Y
input:
sudo apt-get install kubeadm
output:
Y
input:
sudo apt-get install kubectl
output:
input:
sudo apt-get install kubernetes-cni
output:
以上,安装完毕;
设置开机启动:
input:
sudo systemctl enable kubelet && systemctl start kubelet
–kubelet contorl docker
output:
查看kubectl版本:
input : kubectl version
output: