Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ephemeral_Containers_という謎の機能をk8sはどうやって実現しているのか.pdf

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for yugo kobayashi yugo kobayashi
September 28, 2021
310

 Ephemeral_Containers_という謎の機能をk8sはどうやって実現しているのか.pdf

Avatar for yugo kobayashi

yugo kobayashi

September 28, 2021
Tweet

More Decks by yugo kobayashi

Transcript

  1. 結局の所kubeletは何をしているか デバッグするターゲットコンテナと同じ PID Namespace にdebug 用コンテナを起動するというリクエストが CRI(Container Runtime Interface) のAPIに送られる

    CRIへtargetとなるコンテナのPIDを追加して渡している 同じ PID Namespace で起動したら他のコンテナのプロセスに触れる?
  2. 余談 - ところで “PID Namespace” の設定は通常のPod定義で利用できるのだろうか? CRIのAPI定義(LinuxContainerSecurityContext構造体内のNamespaceOptions)ではPID Namespaceを指定できるが、k8sのpod等で利用している core/v1 のContainer構造体定

    義内の SecurityContext では指定できない。 https://pkg.go.dev/k8s.io/cri-api/pkg/apis/runtime/v1alpha2#LinuxContainerSecurityContext https://pkg.go.dev/k8s.io/api/core/v1#SecurityContext 内部的に使用する値のようで通常のPod定義には利用できそうにない