possible to add custom files to /srv/kubernetes?

7/23/2019

When kops is used to create a k8s cluster, a /srv/kubernetes folder gets created and distributed to all the nodes, populated with files automatically created by the provisioning process. My question is whether it's possible for the cluster admin to add files to this volume so that such files can be referenced by passing command-line arguments to kubernetes processes? If so, how to add files so that they are ready when the nodes boot up?

-- Michael Martinez
kops
kubernetes

1 Answer

7/24/2019

Use the fileAssets key in your Cluster manifest:

fileAssets:
  - content: |
      asdf
    name: something
    path: /srv/kubernetes/path/to/file
-- coderanger
Source: StackOverflow