Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do hostPID and hostIPC options mean in a kubernetes pod?

Tags:

kubernetes

In kubernetes pod yaml specification file, you can set a pod to use the host machine's network using hostNetwork:true.

I can't find anywhere a good (suitable for a beginner) explanation of what the hostPID:true and hostIPC:true options mean. Please could someone explain this, assuming little knowledge in linux networking and such. Thanks.

spec:
  template:
    metadata:
      labels:
        name: podName
    spec:
      hostPID: true
      hostIPC: true
      hostNetwork: true
      containers:

Source: github link here

like image 936
mleonard Avatar asked Feb 01 '17 10:02

mleonard


1 Answers

they're roughly described within the Pod Security Policies

hostPID - Use the host’s pid namespace. Optional: Default to false.

hostIPC - Use the host’s ipc namespace. Optional: Default to false.

Those are related to the SecurityContext of the Pod. You'll find some more information in the Pod Security design document.

like image 127
pagid Avatar answered Sep 29 '22 05:09

pagid