Linux installation using minikube kubernetes powerful version of Guide

Preface:

Man of few words said, followed by the operation go, No problem!

First, configure the environment

系统:Linux 7.2
环境:VMware 10
开启   虚拟化
关闭   Firewall
关闭   Selinux

Here Insert Picture Description

Second, the installation step

--- The following operations are performed in Root, with all sources, Ali cloud

1. Install Dokcer

(1) Configuration source yum

vim /etc/yum.repos.d/docker.repo
[docker-repo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

(2) Download Docker

yum -y install docker-engine

(3) to set up and boot

systemctl start docker.service
systemctl enable docker.service

2. Download Minikube - stand-alone version of K8s, used in the machine running K8s cluster

curl -Lo minikube http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.2.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

3. Download VirtualBox - Vmware similar tools, you can choose not to install

(1) Configuration source yum

vim /etc/yum.repos.d/virtualbox.repo
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

(2) Clear the cache yum

yum clean all
yum makecache

(3) Download VirtualBox

yum install VirtualBox-5.2

4. Download Kubectl - stand-alone version of K8s, used in the machine running K8s cluster

curl -LO http://kubernetes.oss-cn-hangzhou.aliyuncs.com/kubernetes-release/release/`curl -s http://kubernetes.oss-cn-hangzhou.aliyuncs.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/kubectl

5. 启动 minikube

minikube start

**如果启动很卡的话,就不用Box创建:**
(minikube start --vm-driver=none --memory 4096 --registry-mirror=registry.aliyuncs.com/google_containers)

Here Insert Picture Description

6. Use the dashboard

minikube dashboard

Here Insert Picture Description


Window Using Minikube


(1) Use minikube ssh into the Box
Here Insert Picture Description
(2) to view the status of the vessel
Here Insert Picture Description
(3) create a Pod "myweb"

kubectl run myweb --image=daocloud.io/nginx --port=80

(4) Port Mapping

kubectl expose deployment myweb --port=80 --type=NodePort

(5) See deployment state
Here Insert Picture Description
(6) View port mapping

kubectl get service

Here Insert Picture Description
(7) in the real machine access Pod
Here Insert Picture Description

Published 10 original articles · won praise 6 · views 584

Guess you like

Origin blog.csdn.net/J_031591/article/details/101703108