Skip to content

Commit

Permalink
capability
Browse files Browse the repository at this point in the history
  • Loading branch information
cvvz committed May 28, 2021
1 parent ec945f9 commit 6ddd1ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/post/container2.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Cgroup v2的变化:一个进程属于一个**控制组**,在这个控制组

## 安全

### capability
### [capability](https://man7.org/linux/man-pages/man7/capabilities.7.html)

k8s没有对user namespace进行隔离,所以我们在容器里运行的是root用户。但是由于缺省启动容器时,系统只为1号进程开启了 [15个capabilities](https://github.com/opencontainers/runc/blob/v1.0.0-rc92/libcontainer/SPEC.md#security)。而通过`kubectl exec -- sh`进入到容器里,启动的`sh`进程(**所有命令的父进程**)和容器的1号进程的 capabilities 相同。

Expand Down

0 comments on commit 6ddd1ba

Please sign in to comment.