Skip to content

Instantly share code, notes, and snippets.

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
key: |
### Heading
* Bullet
* Points
# JSON Output which preserves the line breaks
{
"key": "### Heading\n\n* Bullet\n* Points\n"
example: >
Several lines of text,
with some "quotes" of various 'types'
and also a blank line
plus another line at the end.
JSON
{
version: '3'
services:
web1: &web
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./templates:/etc/nginx/templates
port:
- 80:80
web2:
services:
web1: &web
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./templates:/etc/nginx/templates
port:
- 80:80
version: '3'
services:
web1: &web
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./templates:/etc/nginx/templates
port:
- 80:80
web2:
- &elect Tesla
- BMW
- Lexus
- Lucid
- *elect
# Here the anchor & is elect
# here the alias is *elect
#when the list is executed the actual
<Cars>
<BMW>
<mph>120</mph>
<price>50000</price>
<electric>No</electric>
</BMW>
</Cars>
<Cars>
<Tesla>
<mph>110</mph>
{
"Cars": [
{
"BMW": {
"mph": 120,
"price": 50000,
"electric": false
}
},
{
{
"Cars": [
{
"BMW": {
"mph": 120,
"price": 50000,
"electric": false
}
},
{