Skip to content

Commit 578a5f8

Browse files
Kalyan Reddy DaidaKalyan Reddy Daida
authored andcommitted
Welcome to Stack Simplify
1 parent 0118f3c commit 578a5f8

File tree

1 file changed

+30
-31
lines changed

1 file changed

+30
-31
lines changed

06-YAML-Basics/README.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# YAML Basics
22

3-
## Step-01:
4-
### Key Value Pairs
3+
## Step-01: YAML Fundamentals
4+
### Key Value Pairs & Comments
55
- Space after colon is mandatory to differentiate key and value
66
```yml
77
Name: Kalyan
88
City: New Jersey
99
```
10+
1011
### Array / Lists
1112
- Dash indicates an element of an array
1213
```yml
1314
Employees:
14-
- Kalyan
15-
- John
16-
- David
15+
- Kalyan
16+
- John
17+
- David
1718

1819
Departments:
19-
- HR
20-
- Training
21-
- Development
22-
- Infrastructure
20+
- HR
21+
- Training
22+
- Development
23+
- Infrastructure
2324
```
2425
### Dictionary / Map
2526
- Set of properties grouped together after an item
@@ -32,30 +33,28 @@ Employee:
3233
department: HR
3334
```
3435
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
5139

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+
```
5257

53-
# Kubernetes Editors - Visual Studio Code
5458

55-
## Step-01: Kubernetes
56-
- https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools
5759

58-
- https://code.visualstudio.com/docs/azure/kubernetes
5960

60-
## Step-02: Docker
61-
- https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker

0 commit comments

Comments
 (0)