kubernates+docker environment construction (1, complete the basic setting construction, install docker)

### Resources at hand

.One computer is configured with 64G (it would be better if there is a separate desktop computer, I only have one laptop)

.one network cable

### Purpose resource

## A complete kubernates high-availability cluster is convenient for subsequent drills

.Configure resources for a host, the host has been flashed into a linux system in advance,

.Two virtual machines

---------------------------------------------

## Virtual machine installation

Kvm installation and basic virtual machine installation operations

https://www.centos.bz/2018/02/centos7-4%E5%AE%89%E8%A3%85kvm%E8%99%9A%E6%8B%9F%E6%9C%BA%EF% BC%88%E4%BD%BF%E7%94%A8virt-manager%E7%AE%A1%E7%90%86%EF%BC%89/There are already detailed introductions here and the configuration is not a waste of words .

Remarks: You need to prepare centos7 mirror resources or other resources that can be installed with docker. There are not many detailed installation steps

# Let me talk about the pits you may encounter here,

1. Because virt has already set up a network bridge, the default NAT mode when you install a virtual machine, but the network will not be enabled after centos is installed

When you start typing ip addr, you can't see the ip assigned to you. You need to enter

Make the following changes in /etc/sysconfig/network-script/ifcg- eth0  (the network card depends on its own display)

services network restart

Complete the restart of the network so that your network is connected to the outside world.

2. Of course, it is a very fucking thing to operate on the virtual machine interface, so we need to install ssh software. FinalShell is free, easy to use, and it is a really easy to use ssh software.

In the process of using, you need to configure the firewall to add rules. The first time you use centos7, there are some changes, but it still takes a while.

mark:

New rule iptables -A INPUT -p tcp --dport 22 -j ACCEPT

iptables -A OUTPUT -p tcp -sport 22 -j ACCEPT

The command to restart the firewall has changed to systemctl firewall restart (if you want to enable centos 6, you need to delete an INPUT
REJECT rule)

Reconfigure the sshd_config standard configuration and the startup command has also changed

systemctl sshd restart

 

## docker installation

The official document is here https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce-1

 

## At this point you already have all the basic resources to build kubernates.

 

------Excuse me for not being very detailed

It is mainly recorded as notes, so that one can perform a series of backtracking. 

 

 

Guess you like

Origin blog.csdn.net/weixin_40669549/article/details/91128888