```
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
name: nginx
```
```
apiVersion: v1
kind: Service
metadata:
labels:
app: nginx
name: nginx
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 80
selector:
app: nginx
type: LoadBalancer
```
```
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "nginx-ingress"
labels:
app: nginx-ingress
spec:
rules:
- http:
paths:
- path: /testpath
backend:
serviceName: nginx
servicePort: 8080
```