Study. uk . com
  1. Home
  2. All questions
  3. Question 328

CKA study material · question 328 of 1000

How do the hostPath types DirectoryOrCreate and FileOrCreate behave? Choose two.

  1. DirectoryOrCreate fails if the path is absent
  2. FileOrCreate creates a directory instead of a file
  3. DirectoryOrCreate creates a missing directory with mode 0755
  4. FileOrCreate creates a missing file with mode 0644
Show the answer

Answer: C. DirectoryOrCreate creates a missing directory with mode 0755
D. FileOrCreate creates a missing file with mode 0644

Both create the missing path with those modes, whereas the Directory and File types require it to exist already.

Source: Volumes (Kubernetes) — hostPath volume types

Challenge yourself on this topic → Study as cards