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

27 lines
410 B
YAML
Raw Normal View History

2022-02-11 14:42:37 +01:00
# 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