Could someone let me know the command to create /kubernetes/data/index.html dire . . .

Praveen:
Hi All, Could someone let me know the command to create /kubernetes/data/index.html directory on a specific node with “HelloKubernetes” content in it? how to do this?

JohnC:
Use nodeName: name=-of-actual-node in the pod yaml
Mount a volume, then echo that text into the file?

Praveen:
Thank you @JohnC. i was thinking we can achieve this in 2-3 steps. Step 1: ssh <node-name>; Step 2: the command “mkdir /kubernetes/data/index.html” to create directory but how do we write the content(HelloKubernetes) into the directory?

JohnC:
you have a FILE as part of the directory in the mkdir
mkdir /kubernetes/data

once the directory is created with mkdir:
echo “Hello Kubernetes” >> index.html

that will add the text to the file

Praveen:
Thanks @JohnC. i was under the impression that we need to create directory including file name and with the given content into that file. Thank you for the clarification.