Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “You should receive an error message indicating that the namespace must have the environment
label. Update the test-namespace.yaml
file to include the required label, and the namespace creation should be allowed.”
A block of code is set as follows:
kind: NetworkPolicy apiVersion: networking.k8s.io/v1 metadata: name: frontend-to-backend spec: podSelector: matchLabels: app: backend policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app: frontend ports: - protocol: TCP port: 80 --- kind: NetworkPolicy apiVersion: networking.k8s.io/v1 metadata: name: backend-to-database spec: podSelector: matchLabels: app: database policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app: backend ports: - protocol: TCP port: 3306
Any command-line input or output is written as follows:
$ kubectl apply -f networkPolicy.yaml
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “To create a new visualization, click on the Visualize tab in the left-hand menu. Click Create visualization to start creating a new visualization.”
Tips or important notes
Appear like this.