File tree Expand file tree Collapse file tree 1 file changed +30
-31
lines changed Expand file tree Collapse file tree 1 file changed +30
-31
lines changed Original file line number Diff line number Diff line change 1
1
# YAML Basics
2
2
3
- ## Step-01:
4
- ### Key Value Pairs
3
+ ## Step-01: YAML Fundamentals
4
+ ### Key Value Pairs & Comments
5
5
- Space after colon is mandatory to differentiate key and value
6
6
``` yml
7
7
Name : Kalyan
8
8
City : New Jersey
9
9
` ` `
10
+
10
11
### Array / Lists
11
12
- Dash indicates an element of an array
12
13
` ` ` yml
13
14
Employees :
14
- - Kalyan
15
- - John
16
- - David
15
+ - Kalyan
16
+ - John
17
+ - David
17
18
18
19
Departments :
19
- - HR
20
- - Training
21
- - Development
22
- - Infrastructure
20
+ - HR
21
+ - Training
22
+ - Development
23
+ - Infrastructure
23
24
` ` `
24
25
### Dictionary / Map
25
26
- Set of properties grouped together after an item
@@ -32,30 +33,28 @@ Employee:
32
33
department : HR
33
34
` ` `
34
35
35
- ### Spaces in YAML
36
-
37
-
38
-
39
- ### Key Value / Dictionary / Lists
40
-
41
-
42
- ### Dictionary with in another Dictionary
43
-
44
-
45
- ### Dictionary vs List vs List of Dictionaries
46
-
47
-
48
- ### Dictionary is Unordered, List is Ordered
49
-
50
- ### Comments lines start with HASH
36
+ ## Step-02: YAML for Kubernetes Manifests
37
+ - Comments start with ` #` in YAML
38
+ - Discuss Parent, Child and Spaces
51
39
40
+ ` ` ` yml
41
+ apiVersion: v1 # String
42
+ kind: Pod # String
43
+ metadata: # Dictionary
44
+ name: myapp-pod
45
+ labels: # Dictionary
46
+ app: myapp
47
+ spec:
48
+ containers: # List
49
+ - name: myapp
50
+ image: stacksimplify/kubenginx:1.0.0
51
+ ports:
52
+ - containerPort: 80
53
+ protocol: "TCP"
54
+ - containerPort: 81
55
+ protocol: "TCP"
56
+ ` ` `
52
57
53
- # Kubernetes Editors - Visual Studio Code
54
58
55
- ## Step-01: Kubernetes
56
- - https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools
57
59
58
- - https://code.visualstudio.com/docs/azure/kubernetes
59
60
60
- ## Step-02: Docker
61
- - https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
You can’t perform that action at this time.
0 commit comments