当前位置:网站首页>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

边栏推荐
- 如何使用MISRA改进嵌入式编程
- [局域网劫持]如何搞懵蹭网的同学-详细过程
- How to set the explosion rate of legendary humanoid?Humanoid increase tutorial
- Bika LIMS 开源LIMS集—— SENAITE的使用(用户、角色、部门)
- 【LeetCode】Day105-递增的三元子序列
- 马尔可夫跳变线性系统最优控制的研究现状与进展
- 【FreeSwitch开发实践】自定义模块创建与使用
- R Error in :missing values are not allowed in subscripted assignments of data frames
- plsql连接oracle使用完毕之后关闭问题
- 【堡垒机小知识】硬件堡垒机是什么意思?其与云堡垒机有什么区别?
猜你喜欢

EA&UML日拱一卒-活动图::Object actions(续)

Network connection optimization for instant messaging mobile terminal development

The key to cracking AI full-process development problems

威纶通触摸屏制作自定义欢迎界面的几种方法介绍

84.(cesium之家)cesium模型在地形上运动

中国互联网科技企业群狼围攻,谷歌终于遭受重挫导致利润大跌,它为推动鸿蒙的发展而后悔...

蚂蚁三面滑铁卢!遭分布式截胡,靠这些笔记潜修30天,挺进京东

少儿编程 电子学会图形化编程等级考试Scratch二级真题解析(选择题)2022年6月

分布式事务方案

抓住这几个关键点,做薪酬数据分析并不难
随机推荐
分布式事务方案
TCP和UDP的基本认识
力扣541. 反转字符串 II ----双指针解法
接口和抽象
app小程序开发的营销优势有什么?
Nine kinds of way, teach you to read the resources files in the directory path
项目经理:不错啊!SSO单点登录代码写出来了,把时序图也画一下?
1192. 奖金
【论文阅读】Anomaly Detection in Video via Self-Supervised and Multi-Task Learning
Gdb debugging common concepts finishing
期货合约知多少
简单了解单例模式
马尔可夫跳变线性系统最优控制的研究现状与进展
Bika LIMS 开源LIMS集—— SENAITE的使用(分析/测试、方法)
解决:Parameter 0 of method ribbonServerList in com.alibaba.cloud.nacos.ribbon.NacosRibbonClientConfigu
升级 MDK 5.37 后的问题处理: AC6编译选项, printf, 重启失效等
The new technical director, who is in the form of a isXxx Boolean type definition, tomorrow need not come!
AI全流程开发难题破解之钥
leetcode134. 加油站
How to merge the code when there is a code conflict in the collaborative development of multiple people?