摘要: # ### 代码块 : 用冒号作为开始,用缩进来划分相同的作用域 """作用域: 作用范围""" # 基本使用 """代码块是一个整体,在条件满足时,会一并执行,否则一并不执行""" if 10 == 10: print(1) print(2) print(3) # 注意点 """在使用代码时,要么 阅读全文
posted @ 2020-07-29 09:19 Mr'liu 阅读(195) 评论(0) 推荐(0)
摘要: # ### 变量的缓存机制 (仅对python3.6版本负责)# -->Number 部分(int,float.bool,complex)# 1.对于整数而言,-5~正无穷范围内的相同值,id一致var1 = 10var2 = 10var1 = -100var2 = -100print(id(var 阅读全文
posted @ 2020-07-23 15:20 Mr'liu 阅读(240) 评论(0) 推荐(0)
摘要: 问题故障:Mysql数据库意外崩溃,一直无法启动数据库。报错日志: 启动报错:service mysqld restartERROR! MySQL server PID file could not be found!Starting MySQL. ERROR! The server quit wi 阅读全文
posted @ 2020-07-20 10:42 Mr'liu 阅读(4718) 评论(0) 推荐(0)
摘要: #### 一:注释#注释:对代码的解释#注释快捷键:notepod++: ctrl + q / pychorm: ctrl + / |ctrl + z 撤销 | ctrl + y 反撤销'''代码注释原则:不用给全部代码加注释,只需要在自己觉得重要或不好理解的部分加注释即可注释可以用中文或英文,但绝 阅读全文
posted @ 2020-07-16 09:34 Mr'liu 阅读(362) 评论(1) 推荐(1)
摘要: kubectl cp 命令使用 kubectl cp --helpCopy files and directories to and from containers.Examples:# !!!Important Note!!!# Requires that the 'tar' binary is 阅读全文
posted @ 2020-07-09 14:50 Mr'liu 阅读(65951) 评论(0) 推荐(1)
摘要: 背景:jenkins部署在k8s中的命名空间infra中 Jenkins集成k8s报错 连接测试报错: Error testing connection https://kubernetes.default.svc.cluster.local: Failure executing: GET at: 阅读全文
posted @ 2020-06-30 16:18 Mr'liu 阅读(5028) 评论(0) 推荐(1)
摘要: #因在容器中排查故障需要,安装基础工具 # 查看系统版本: cat /etc/os-release Debian基础镜像#先添加163源 # 新版本源(更新) tee /etc/apt/sources.list << EOF deb http://mirrors.163.com/debian/ bu 阅读全文
posted @ 2020-06-30 15:04 Mr'liu 阅读(13329) 评论(0) 推荐(1)
摘要: 如何使用Jenkins Pipeline 获取git commit id? 需求:jenkins pipeline获取git commit id 作为docker中imagesTag标识 解决方法:使用git方法获取commit idgit rev-parse HEAD (完整) 或者git rev 阅读全文
posted @ 2020-06-19 18:24 Mr'liu 阅读(9054) 评论(0) 推荐(1)
摘要: Flannel Network实现原理Flannel为每个主机提供独立的子网,整个集群的网络信息存储在etcd上。对于跨主机的转发,目标容器的IP地址,需要从etcd获取。先上图,比较直观: 步骤: (1)IP数据报被封装并通过容器的eth0发送。 (2)Container1的eth0通过veth对 阅读全文
posted @ 2020-06-04 17:24 Mr'liu 阅读(1841) 评论(0) 推荐(0)
摘要: 问题:Kubernetes创建Pod失败,无法获取image Failed create pod sandbox: rpc error: code = Unknown desc = failed pulling image "harbor.od.com/public/pause:latest": E 阅读全文
posted @ 2020-05-28 15:14 Mr'liu 阅读(4124) 评论(0) 推荐(1)