当前位置:网站首页>kubernetes中正strace etcd
kubernetes中正strace etcd
2022-07-29 14:24:00 【ghostwritten】
strace The full name is System Call Tracing,Meaning it's a process,Acts like a sidecar on the system call interface,Every system call is logged.这篇 Medium 文章to how most people use it in practice strace A very simple explanation is given,If anyone is interested in details,这篇文章A thorough walkthrough will be given.归根结底,您可以在 strace There are many parameters used in ,And it all depends on the situation.为了演示,We will be debugging Kubernetes Use the usual ones for operation.
An example would be to see if we can read stored in etcd 中的秘密.为了实现这一点,我们需要知道 etcd 正在运行的进程 ID
$ ps aux | grep etcd
从上面的结果来看,第一个进程 ID will be our goal,Because the second process is kube-apiserver,The third is what we just implemented“grep”
sudo strace -p 4295
We should see a lot of operations listed.从这里,We can go to the process directory and see what it contains.
- sudo su
- cd /proc/4295/fd
- ls -l | grep 7
此时,目录“7”seems to contain K8s 需要的信息.We can create a simple secret and try to find the value in it.
- kubectl create secret generic credit-card --from-literal ssecret=1111222233334444
#Make sure you are still in directory /proc/4295/fd.
#"-A10" and "-B10" mean show 10 lines before and after the searching string.
- cat 7 | strings | grep 1111222233334444 -A10 -B10
边栏推荐
- C#实现线程管理类
- 【JS面试题】面试官问我:遍历一个数组用 for 和 forEach 哪个更快?
- 少儿编程 电子学会图形化编程等级考试Scratch二级真题解析(选择题)2022年6月
- Sentinel vs Hystrix 限流到底怎么选?(荣耀典藏版)
- 暴力递归到动态规划 02 (绝顶聪明的人的纸牌游戏)
- [10:00 Open Class]: Application Exploration of Kuaishou GPU/FPGA/ASIC Heterogeneous Platform
- gdb调试常用概念整理
- 3555. 二叉树
- 还在开发短信验证码登录?试试(本机号码一键登录)
- human pose estimation-DEKR2021CVPR
猜你喜欢
[10:00 Open Class]: Application Exploration of Kuaishou GPU/FPGA/ASIC Heterogeneous Platform
中国电信首发全新加密通话产品!有效防止网络监听
通过二维顺序表实现杨辉三角
有关包装类的一道经典面试题
Gee engine modification UI interface graphic tutorial
BOM系列之Location对象
企业需要知道的5个 IAM 最佳实践
何为擦除机制,泛型的上界?
深度解析C语言文件操作以及常见问题
How to set the explosion rate of legendary humanoid?Humanoid increase tutorial
随机推荐
164. 可达性统计
搞直播啦,千视超高清4K NDI编解码器8月3日19:00准时开播
1184. 欧拉回路
PytestFixture实战应用+Pytest.ini与conftest.py应用详解+Fixture及yield实现用例前置后置
Sqoop导入导出时数据内存溢出
简单了解单例模式
480-82(59、151)
开关电源-PWM外设简介及MCC配置
2022年了!还在用定时器实现动画?赶紧试试requestAnimationFrame吧!
How much do you know about futures contracts
力扣541. 反转字符串 II ----双指针解法
TAP 文章系列-10 | 从应用感知能力谈 TAP 的约定服务
PyQt5快速开发与实战 7.1 信号与槽介绍
The key to cracking AI full-process development problems
torchvison里面的数据增强
开关电源-LLC基本原理
【模板引擎】微服务学习笔记六:freemarker模板引擎的常用命令介绍
How to set the explosion rate of legendary humanoid?Humanoid increase tutorial
验证二叉树的前序序列化[抽象前序遍历]
Understand the yolov7 network structure