Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method and steps of setting up K8S cluster and installing docker under Hyper-V

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

If you have installed a win10 system and want to do a K8s cluster, win10's own hyper-v is also a very suitable virtual machine environment. In the previous section, we installed two virtual machines, both of which were installed with docker.

Master: 192.168.137.2

Node1: 192.168.137.3

Root password: 123456

1. Log in to the virtual machine using ssh

With ssh, you can connect to the virtual machine directly in win10 host

Ssh root@192.168.137.2

two。 Turn off security configuration

Vi / etc/selinux/config

3. Turn off the firewall

Systemctl stop firewalldsystemctl disable firewalld

4. Permanently disable swap

Swapoff-avi / etc/fstab

Comment out the swap line with #

5. Install the latest version of docker

Https://docs.docker.com/install/linux/docker-ce/centos/

Uninstall the old docker

Sudo yum remove docker\ docker-client\ docker-client-latest\ docker-common\ docker-latest\ docker-latest-logrotate\ docker-logrotate\ docker-engine

Install dependency packages

Sudo yum install-y yum-utils\ device-mapper-persistent-data\ lvm2

Configure docker Warehouse Source

Sudo yum-config-manager\-- add-repo\ https://download.docker.com/linux/centos/docker-ce.repo

Install docker

Sudo yum install docker-ce docker-ce-cli containerd.io

Let docker start itself

Systemctl enable dockersystemctl start docker

Check to see if the installation is successful

Docker-v

6. Configure the cgroupdriver type of Ali Cloud Mirror Accelerator and docker cgroupdriver type

Set to systemd to be consistent with k8s

Sudo mkdir-p / etc/dockersudo tee / etc/docker/daemon.json

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report