Welcome to the Linux Foundation Forum!

Lab 5.1 Questions and Observations

mrmcmuffinz
mrmcmuffinz Posts: 9
edited May 2018 in LFD259 Class Forum

Observations:

Looks like there is a few typos in the lab 5.1 page 6

1. it should be lower case v for volumes.

2. the name should have its indented by 1 more space.

Questions:

1. After setting up the nfs share, pv, pvc and mounting it inside the pod. Why can't I write anything to the share? I get permission denied. I also can't even modify the hello.txt file, I can however cat the file and see the contents.

2. Where do I get a copy of the app1/simpleapp.yaml file that has not been modified for the lab as it is not part of the lfd259 bundle?

Comments

  • chrispokorni
    chrispokorni Posts: 2,155

    Hi,

    I agree that yaml files are painful sometimes, but aside from just playig with indentation, I find this site useful: 

    https://www.json2yaml.com/

    1 - Writing to share issue: sounds like permission related, where a read-only permission is set. Wondering if it has anything to do with the readOnly option in PVol.yaml

    2 - I think the reason why simpleapp.yaml is not part of the bundle is because we start by creating our own in Lab 3.1 and then just re-use the same yaml file, by modifying it for every subsequent lab

    Regards, 

    -Chris

  • I have figured out why I was getting permission denied. The problem was with the security context (SC) for the pod specifically I had a SC for both the pod and the container inside the pod. It looks like if a container has a SC that takes precedance over the SC for the pod. Also I needed to set runAsUser: 0, fsGroup: 0 in the SC.

  • Section 5.1, Step 6 has an error
    6. Even though the try1 container is not in a ready state, it is running and useful. Use kubectl exec to view a variables
    value. View the pod state then verify you can see the ilike value within.
    student@ckad-1:~$ kubectl get po

    student@ckad-1:~$ kubectl exec -c try1 -it try1-5db9bc6f85-whxbf -- \
    /bin/bash -c 'echo $ilike'
    blue

    There is no try1 container, its simpleapp . So again LinuxFoundation is not checking the steps with care and also didnt give all the yaml files to practice seamlessly.

    Correct command and response.
    master:~$ kubectl exec -c simpleapp -it try1-6ff4fc446f-7tpvx -- /bin/bash -c 'echo $ilike'
    blue

  • Thank you for your valuable feedback. This will be fixed in the next course update.

  • the typo in lab 5.1 step 6 is still present in the updated lab documents (-c try1 should be -c simpleapp)

Categories

Upcoming Training