10

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

Chris
  • 5,109
  • 3
  • 19
  • 40
mleonard
  • 171
  • 1
  • 2
  • 8

1 Answers1

12

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.

Maiko Kingma
  • 929
  • 3
  • 14
  • 29
pagid
  • 13,559
  • 11
  • 78
  • 104
  • Thanks very much for the help. – mleonard Feb 01 '17 at 13:02
  • Happy to help. If this answer or any other on SO solves your issue, please mark it as accepted. – pagid Feb 21 '17 at 21:28
  • 4
    The link to that design document has changed -- it is now [located here](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/auth/pod-security-context.md) – mcwayliffe Feb 12 '18 at 20:44