Created
January 30, 2024 07:59
-
-
Save uurtech/385fd56e01d1678067c1dabb40301e20 to your computer and use it in GitHub Desktop.
EKS, nginx with ingress controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
labels: | |
app: nginx | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:latest | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: nginx-ingress | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
spec: | |
rules: | |
- host: your.domain.com | |
http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: nginx-service | |
port: | |
number: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment