JSON Viewer & Editor: Repair, Fix, and Beautify JSON Online
{
"apiVersion": "v1",
"kind": "List",
"items": [
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "my-api-deployment"
},
"spec": {
"replicas": 3,
"selector": {
"matchLabels": {
"app": "my-api"
}
},
"template": {
"metadata": {
"labels": {
"app": "my-api"
}
},
"spec": {
"containers": [
{
"name": "my-api",
"image": "nginx:latest",
"resources": {
"limits": {
"cpu": "500m",
"memory": "512Mi"
},
"requests": {
"cpu": "250m",
"memory": "256Mi"
}
},
"env": [
{
"name": "API_KEY",
"valueFrom": {
"secretKeyRef": {
"name": "my-api-secret",
"key": "apiKey"
}
}
}
],
"volumeMounts": [
{
"mountPath": "/data",
"name": "storage"
}
]
}
],
"volumes": [
{
"name": "storage",
"persistentVolumeClaim": {
"claimName": "my-api-pvc"
}
}
]
}
}
}
},
{
"apiVersion": "autoscaling/v2",
"kind": "HorizontalPodAutoscaler",
"metadata": {
"name": "my-api-hpa"
},
"spec": {
"scaleTargetRef": {
"apiVersion": "apps/v1",
"kind": "Deployment",
"name": "my-api-deployment"
},
"minReplicas": 3,
"maxReplicas": 10,
"metrics": [
{
"type": "Resource",
"resource": {
"name": "cpu",
"target": {
"type": "Utilization",
"averageUtilization": 80
}
}
}
]
}
},
{
"apiVersion": "v1",
"kind": "Service",
"metadata": {
"name": "my-api-service"
},
"spec": {
"type": "ClusterIP",
"selector": {
"app": "my-api"
},
"ports": [
{
"port": 80,
"targetPort": 80
}
]
}
},
{
"apiVersion": "networking.k8s.io/v1",
"kind": "Ingress",
"metadata": {
"name": "my-api-ingress"
},
"spec": {
"rules": [
{
"host": "api.example.com",
"http": {
"paths": [
{
"path": "/api/v1",
"pathType": "Prefix",
"backend": {
"service": {
"name": "my-api-service",
"port": {
"number": 80
}
}
}
},
{
"path": "/api/v2",
"pathType": "Prefix",
"backend": {
"service": {
"name": "my-api-service",
"port": {
"number": 80
}
}
}
},
{
"path": "/api/v3",
"pathType": "Prefix",
"backend": {
"service": {
"name": "my-api-service",
"port": {
"number": 80
}
}
}
}
]
}
}
]
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "my-api-pvc"
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "1Gi"
}
}
}
},
{
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"name": "my-api-secret"
},
"type": "Opaque",
"data": {
"apiKey": "eW91ci1zZWNyZXQtYXBpLWtleQ=="
}
}
]
}