GPT-3 Completes Kubernetes YAML Files

Prompt

Input: expose wordpress on port 80
Output:
apiVersion: v1
kind: Service
metadata:
name: wordpress-service
spec:
selector:
app: wordpress
ports:
- protocol: TCP
port: 80

Input: deploy wordpress with 2 replicas
Output:
apiVersion: apps/v1
kind: Deployment
metadata:
name: wordpress-deployment
labels:
app: wordpress
spec:
replicas: 3
selector:
matchLabels:
app: wordpress
template:
metadata:
labels:
app: wordpress
spec:
containers:
- name: wordpress
image: wordpress:3.5.0
ports:
- containerPort: 80

Input: deploy Elasticsearch
Output:

Output

apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch-deployment
spec:
replicas: 2
selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- name: elasticsearch
image: elasticsearch:2.3.2
apiVersion: v1
kind: Service
metadata:
name: elasticsearch-service
spec:
selector:
app: elasticsearch
ports:
- protocol: TCP
port: 9200

Input: expose elasticsearch on port 9200
Output:
apiVersion: v1
kind: Service
metadata:
name: elasticsearch-service
spec:
selector:
app: elasticsearch
ports:
- protocol: TCP
port: 9200

Input: deploy elasticsearch with 2 replicas
Output:
apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch-deployment
spec:
replicas: 2
selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- name: elasticsearch
image: elasticsearch:2.3.2
apiVersion: v1
kind: Service
metadata:
name: elasticsearch-service
spec:
selector:
app: elasticsearch
ports:
- protocol: TCP
port: 9200