01 2022 档案

摘要:k8s命令脚本1-快捷查看所有pod、services、deployment、pv、pvc、ep ####功能: 将常用的k8s查看命令写入脚本,使用sh命令执行,方便快捷查看k8s状态 echo -e "\033[34m nodes————————————————————————————————— 阅读全文
posted @ 2022-01-27 09:49 tangshow 阅读(3937) 评论(0) 推荐(0) 编辑
摘要:最近部署了k8s,默认使用的主机存储。主机/目录默认空间较小,并且部分容器对磁盘io要求较高。遂搭建glusterfs文件系统,并配置给k8s使用。 glusterfs搭建步骤见 https://www.cnblogs.com/tangshow/p/15930784.html ##环境 cetons 阅读全文
posted @ 2022-01-26 15:34 tangshow 阅读(445) 评论(0) 推荐(0) 编辑
摘要:##需求 在一台宿主机上运行多个docker容器,并且自动给容器分配和宿主机同网段的局域网ip ##环境 centos7、docker 、python2.7.x、pipework centos7直连路由器,且该网段内还有未分配的ip ##一 新建 python脚本 /root/cron/docker 阅读全文
posted @ 2022-01-25 14:17 tangshow 阅读(704) 评论(0) 推荐(0) 编辑
摘要:## -*- coding: utf-8 -*-#获取路由器下可用ip,分配给各个容器,循环检查分配是否正常 import osimport timefrom itertools import isliceimport os.path #网关ip_gate = "192.168.124.1"mask 阅读全文
posted @ 2022-01-25 11:53 tangshow 阅读(38) 评论(0) 推荐(0) 编辑
摘要:centos7搭建k8s集群(v1.19.x) ##一、部署环境 共有3台服务器 1台master,2台node。 ##二、安装准备工作 ####1 关闭防火墙 systemctl stop firewalld && systemctl disable firewalld ####2 永久关闭sel 阅读全文
posted @ 2022-01-25 10:58 tangshow 阅读(92) 评论(0) 推荐(0) 编辑
摘要:需求 需要让docker容器使用路由器提供的内网ip,使用内网ip直接访问容器。 环境准备 centos7系统、docker。 1.宿主机安装pipework wget -O pipework-master.zip https://codeload.github.com/jpetazzo/pipew 阅读全文
posted @ 2022-01-24 16:54 tangshow 阅读(1152) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示