Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels: ...
spec:
replicas: 2
selector: ...
template: ...
Service
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector: ...
ports: ...
a data serialization language just like XML, JSON
standard format to transfer data
human readable and intuitive
YAML ( line separation, indentation )
microservices:
- app: user-authentication
port: 9000
version: 1.0
XML ( < > )
<microservices>
<microservices>
<app>user-authentication</app>
<port>9000</port>
<version>1.0</version>
</microservices>
</microservices>
JSON ( { } )
{
microservices: [
{
app: "user-authentication",
port: 9000
version: "1.0"
}
]
}
# this is yaml file
microservice: # makes object
- app: user-authentication # first element of list
port: 9000
version: 1.7
deployed: false # true / false || on / off
- app: login # second element of list
port: 9001
versions: [1.5, 1,9] # list too
deployed: true