[Kubernetes] Use Minikube to quickly build a local k8s environment (based on Docker drive mode)

Source: Internet
Author: User
Tags gpg k8s aliyun

First, the experimental environment

Operating system: Centos 7 x86_64

docker:1.12.6

II. Deployment of k8s steps

2.1 Installation Kubectl

Cat <<eof >/etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=kubernetes
baseurl=http:// mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
GPGKEY=HTTP://MIRRORS.ALIYUN.COM/KUBERNETES/YUM/DOC/YUM-KEY.GPG
       http://mirrors.aliyun.com/kubernetes/ YUM/DOC/RPM-PACKAGE-KEY.GPG
EOF

yum install-y kubectl

2.2 Installation Minikube

Download Address: HTTPS://STORAGE.GOOGLEAPIS.COM/MINIKUBE/RELEASES/V0.26.1/MINIKUBE-LINUX-AMD64

When the download is complete, rename the minikube-linux-amd64 to Minikube and place it in the/usr/bin/directory

Give execution permission: chmod +x/usr/bin/minikube

2.3 Preparing for mirroring

One way is to download it via the Dockerhub relay

(Reference: https://blog.csdn.net/shida_csdn/article/details/78480241)

Another way is to configure Docker to bypass the GW agent.

(Reference: https://blog.csdn.net/shida_csdn/article/details/79757793)

2.4 Start k8s Service

# Minikube Start--vm-driver=none

2.5 Check whether the service is normal

# Kubectl Get node

2.6 Configuration Dashboard

# Minikube Dashboard

2.7 View Dashboard

Open the browser, access:http://< your machine IP address >:30000

2.8 How to start and stop the cluster

2.9 How to delete a cluster

# minikube Delete
# rm-rf ~/.minikube
# kubeadm Reset

Third, error resolution

A DNS startup problem was encountered during setup.

Refer here to solve: https://blog.csdn.net/shida_csdn/article/details/80028905

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.