This repository has been archived on 2022-02-19. You can view files and clone it, but cannot push or open issues or pull requests.
infra-aws-eks/k8s/samples/nginx.yaml
2022-02-13 22:00:34 +01:00

27 lines
410 B
YAML

# A nginx instance with a NodePort.
---
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.21
---
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
ports:
- port: 8123 # Port exposed in cluster
targetPort: 80 # Port inside container
protocol: TCP
nodePort: 31234
selector:
app: nginx
type: NodePort