When learning kubernetes, we need to practice in the kubernetes environment. However, the kubernetes environment installation is not containerized. Now we can simplify the installation process through rancher. Let's practice kubernetes under rancher. The entire practice is divided into two chapters: "Building a standardized vmware image" and "Installing and deploying rancher and kubernetes" Prerequisites Since you need to use Google's services, your network environment must be able to access the Internet scientifically. The specific solution will not be described here; Actual combat environment The computer used in this practice is Win10 Home Edition. Three Ubuntu16.04 virtual machines are run through VMware. One is used as Rancher Server to create a Kubernetes environment. The other two are added to this Kubernetes environment as nodes. What is a standardized vmware image? This practical exercise will use three Ubuntu virtual machines. It is obviously very time-consuming to start from installing Ubuntu, so we only install the Ubuntu system once, make some common settings on this system, install common applications, and then use the files of this virtual machine as a standardized image, copy three copies, and then you can start three virtual machines; Installing the operating system Download the installation file Use the downloaded ubuntu-16.04.3-server-amd64.iso file to install a virtual machine on VMware. I used Remotely connect to a virtual machine After installing the system, use the SecureCRT tool to remotely connect to the virtual machine, as shown below: After logging in, use the su - command to switch to the root account; Set to allow remote root account login Open the /etc/ssh/sshd_config file and find the following line: PermitRootLogin prohibit-password Change it to the following: PermitRootLogin yes Then execute the command Update Source Log in to the virtual machine with the root account, open the /etc/apt/sources.list file, delete all the contents, and then add the following content (the source of Alibaba Cloud is currently faster): # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse After the update is complete, execute the Install Docker Install dependent applications: apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ software-properties-common Download the package key and add it to the local trusted database: curl -fsSL https://download.daocloud.io/docker/linux/ubuntu/gpg | sudo apt-key add - Add ppa source: add-apt-repository \ "deb [arch=$(dpkg --print-architecture)] https://download.daocloud.io/docker/linux/ubuntu \ $(lsb_release -cs) \ stable" Make an update apt-get update Install Docker apt-get install -y -q docker-ce=17.03.2* Start Docker service docker start View Docker status service docker status After successful startup, the status information is as follows: Backup image file Shut down the virtual machine, find the corresponding folder, and back up the entire folder as a standardized image. When we install the Rancher server and node nodes later, we can just copy these folders and open them. In the next chapter, we will install the Rancher server, add the node to the server environment, and then experience Kubernetes. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: JavaScript implements color identification when the mouse passes over the table row
>>: Vue achieves seamless carousel effect
<br />Related articles: Web skills: Multiple...
1. delete delete is the only real way to remove a...
Table of contents Preface 1. Split a string 2. JS...
This article shares MYSQL logs and backup and res...
Table of contents Preface Parsing parameters Modi...
Generally, when we use a table, we always give it...
Table of contents Determine whether a record alre...
This article mainly summarizes some commonly used...
Assumption: The stored procedure is executed ever...
Unlike other types of design, web design has been ...
Written in front In today's Internet field, N...
<br />When uploading on some websites, a [Se...
——Notes from "MySQL in Simple Terms (Second ...
This article shares the installation and configur...
CSS scroll bar style modification code .scroll::-...