一、准备工作:
1、创建三台虚拟机:(在node1配置好环境,然后关机克隆出node2、node3、并修改网卡、主机名即可)
linux-node1.example.com 192.168.43.21
linux-node2.example.com 192.168.43.22
linux-node3.example.com 192.168.43.23
设置主机名:
[root@linux-node1 ~]# hostnamectl set-hostname linux-node1.example.com
2、配置IP:
[root@linux-node1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet
BOOTPROTO=static
NAME=ens32
DEVICE=ens32
ONBOOT=yes
IPADDR=192.168.43.21
NETMASK=255.255.255.0
GATEWAY=192.168.43.2
DNS1=192.168.43.2
3、关闭NetworkManager、firewalld、selinux等
[root@linux-node1 ~]# systemctl disable NetworkManager
[root@linux-node1 ~]# systemctl disable firewalld
[root@linux-node1 ~]# vim /etc/selinux/config ---->SELINUX=enforcing
4、设置主机名解析:
[root@linux-node1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.43.21 linux-node1 linux-node1.example.com
192.168.43.22 linux-node2 linux-node2.example.com
192.168.43.23 linux-node3 linux-node3.example.com
5、安装epel扩展源和常用的命令
[root@linux-node1 ~]# yum install -y net-tools vim lrzsz tree screenlsof tcpdumpnc mtr nmap
6、安装Docker
[root@linux-node1 ~]# cd /etc/yum.repos.d/
[root@linux-node1 yum.repos.d]# yum install -y docker-ce
[root@linux-node1 yum.repos.d]# systemctl start docker
[root@linux-node1 yum.repos.d]# systemctl enabled docker
7、创建部署目录
[root@linux-node1 ~]# mkdir -p /opt/kubernetes/{cfg,bin,ssl,log} #cfg存放配置文件;bin存放二进制文件;ssl存放证书文件;log存放日志文件。
8、关机---克隆出两台linux-node2、linux-node3并修改主机名、网卡
linux-node2:
[root@linux-node1 ~]# shutdown -h now
[root@linux-node1 ~]# hostnamectl set-hostname linux-node2.example.com #修改主机名
[root@linux-node1 ~]# su -
[root@linux-node2 ~]# hostnamectl
Static hostname: linux-node2.example.com
Icon name: computer-vm
Chassis: vm
Machine ID: 09bb654cb3f7445e9a9abd9dd32b9e2c
Boot ID: 939c901cfa7246dda1e90946ac6f3b08
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-693.el7.x86_64
Architecture: x86-64
[root@linux-node2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet
BOOTPROTO=static
NAME=ens32
DEVICE=ens32
ONBOOT=yes
IPADDR=192.168.43.22
NETMASK=255.255.255.0
GATEWAY=192.168.43.2
DNS1=192.168.43.2
 
linux-node3:
[root@linux-node1 ~]# hostnamectl set-hostname linux-node3.example.com #修改主机名
[root@linux-node1 ~]# su -
[root@linux-node3 ~]# hostnamectl
Static hostname: linux-node3.example.com
Icon name: computer-vm
Chassis: vm
Machine ID: 09bb654cb3f7445e9a9abd9dd32b9e2c
Boot ID: 939c901cfa7246dda1e90946ac6f3b08
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-693.el7.x86_64
Architecture: x86-64
[root@linux-node3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet
BOOTPROTO=static
NAME=ens32
DEVICE=ens32
ONBOOT=yes
IPADDR=192.168.43.23
NETMASK=255.255.255.0
GATEWAY=192.168.43.2
DNS1=192.168.43.2

Centos7部署kubernetes准备工作(一)的更多相关文章

  1. Centos7部署kubernetes API服务(四)

    1.准备软件包 [root@linux-node1 bin]# pwd /usr/local/src/kubernetes/server/bin [root@linux-node1 bin]# cp ...

  2. [Kubernetes]CentOS7部署Kubernetes集群

    环境介绍及安装前准备 三台机器,用于部署k8s的运行环境: 节点 ip Master 192.168.243.138 Node1 192.168.243.139 Node2 192.168.243.1 ...

  3. Centos7部署Kubernetes集群

    目录贴:Kubernetes学习系列 1.环境介绍及准备: 1.1 物理机操作系统 物理机操作系统采用Centos7.3 64位,细节如下. [root@localhost ~]# uname -a ...

  4. centos7部署kubernetes

    参考:https://www.cnblogs.com/zhenyuyaodidiao/p/6500830.html 1.环境介绍及准备: 1.1 物理机操作系统 物理机操作系统采用Centos7.3 ...

  5. Centos7部署Kubernetes集群(单工作节点)+配置dashboard可视化UI

    目标:docker+kubernetes+cadvosor+dashboard 一:物理硬件 两台虚拟机(centos7):一台做为主节点(master),一台做为工作节点(node) [root@M ...

  6. Centos7部署kubernetes Proxy(七)

    1.配置kube-proxy使用LVS(三个节点都装上去) [root@linux-node1 ssl]# yum install -y ipvsadm ipset conntrack [root@l ...

  7. Centos7部署kubernetes集群CA证书创建和分发(二)

    1.解压软件包 [root@linux-node1 ~]# cd /usr/local/src/ [root@linux-node1 src]# ls k8s-v1.10.1-manual.zip [ ...

  8. Centos7部署kubernetes测试k8s应用(九)

    1.创建一个deployment [root@linux-node1 ~]# kubectl run net-test --image=alpine --replicas=2 sleep 360000 ...

  9. centos7 使用kubeadm 快速部署 kubernetes 国内源

    前言 搭建kubernetes时看文档以及资料走了很多弯路,so 整理了最后成功安装的过程已做记录.网上的搭建文章总是少一些步骤,想本人这样的小白总是部署不成功(^_^). 准备两台或两台以上的虚拟机 ...

随机推荐

  1. VA&RVA 和 RVA to RAW

    VA&RVA VA指的是进程虚拟内存的绝对地址,RVA(Relative Virtual Address,相对虚拟地址)指从某个基准位置(ImageBase)开始的相对地址.VA与RVA满足下 ...

  2. 恶意代码分析-使用apataDNS+inetsim模拟网络环境

    准备工作 虚拟机安装: Win7 Ubuntu apateDNS 密码:wplo inetsim 密码:ghla 客户端Win7需要做的工作 安装apateDNS 服务器端Ubuntu需要做的工作 下 ...

  3. Node版本管理nvm, npm

    nvm(node version manger) Node版本管理 nvm是一个简单的bash script来管理多个活动的node.js版本. 安装nvm: 具体看git:https://githu ...

  4. Watering Grass UVA - 10382

    喷水装置的圆心和半径确定,就能确定左端和右端.开始时pos=0,选取左端小于pos,右端最大的更新pos. #include <iostream> #include <cstdio& ...

  5. Wannafly挑战赛26 B 冥土追魂

    首先,证明结果一定是取某些整行,再加上一个多余的一行的前几个. 假如: x1<=x2<=x3<=x4<=x5 y1<=y2<=y3<=y4<=y5 取6 ...

  6. 微信小程序发起微信支付

    点击链接查看详情:(支付中配置参数需要从后台得到->签名需要从微信申请才可以得到) https://mp.weixin.qq.com/debug/wxadoc/dev/api/api-pay.h ...

  7. ImportError: sys.meta_path is None, Python is likely shutting down

    python执行过错中,报错:ImportError: sys.meta_path is None, Python is likely shutting down 解决方法:在C:\Users\Adm ...

  8. 141. Linked List Cycle&142. Linked List Cycle II(剑指Offer-链表中环的入口节点)

    题目: 141.Given a linked list, determine if it has a cycle in it. 142.Given a linked list, return the ...

  9. phpmyadmin getshell

    执行SQL语句:SET GLOBAL general_log = ON

  10. python-day72--django实现的cookie/session

    COOKIE 与 SESSION 一.概念cookie不属于http协议范围,由于http协议无法保持状态,但实际情况,我们却又需要“保持状态”,因此cookie就是在这样一个场景下诞生.cookie ...