How to Use This Guide
Conventions Used in This Guide
This guide uses some conventions to improve your overall experience. Here are some of them:
Heredoc
We will make extensive use of heredoc to create files. Heredoc is a way to create multi-line strings in Bash. It is a redirection method that allows you to pass multiple lines of input to a command. Here is an example:
cat <file.txt
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
EOF
The <
The > operator redirects the output to a file. As a result, when you copy and paste the whole block to your terminal, it will create a file named file.txt with the content:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
When >> is used instead of >, the content will be appended to the file instead of overwriting it.
When a variable is used inside a heredoc, the variable will be expanded. For example:
# export an environment variable
export ARGUMENT="world"
# create a file with the variable expanded
cat <file.txt
Hello, $ARGUMENT!
EOF
The content of file.txt will be:
Cloud-Native Microservices With Kubernetes - 2nd Edition
A Comprehensive Guide to Building, Scaling, Deploying, Observing, and Managing Highly-Available Microservices in KubernetesEnroll now to unlock all content and receive all future updates for free.
