Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 86.8 KB

README.md

File metadata and controls

32 lines (22 loc) · 86.8 KB

Exercise Description (Working with long lines of text):

With this exercise we will learn about the two different ways that you can break out a string into multiple lines within a YAML document, and explain what the functional difference is between the two different methods.

Example 1 (Multiple lines, but not preserving new-lines):

With the example below, you can see that we use the ">" character to tell YAML that we want to represent the the next few lines as a "single line" for the output. This means that new-line characters will not be preserved.

No Line Breaks

Example 2 (Multiple lines, but preserving new-lines):

With the example below, you can see that we use the "|" character to tell YAML that we want to keep all new-lines (line breaks) for the output. Again, this means that new-line characters will be preserved. Example 2

Exercise Instructions:

  1. Open the file l1_e4.yaml and supply the appripiate scalar (values) to the two keys provided.

  2. Open the terminal within VS Code, press the following keys together: ctrl + shift + `

  3. Change directory to this exercise folder with the following command: cd ~/Kubernetes_Labs/lab1/exercise-4

  4. After supplying all the values, run the following command to check your work: ./check-work


After completing the this exercise, please click on the button below to go to the next exercise where you'll learn about sequences.
Next Exercise