Closed bruvio closed 1 week ago
I also tried using the guidance from AWS installing the controller using
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-0.34.0/deploy/static/provider/aws/deploy.yaml
and still getting same. can it be a infra bug?
pretty sure the ingress is working because if i deploy a serive as nodeport with a swcurity group that open traffic on that port i can connect at mydns.net:PORT
I installed the controller following
CHART_VERSION="4.4.0"
APP_VERSION="1.11.2"
mkdir ./manifests/
helm template ingress-nginx ingress-nginx \
--repo https://kubernetes.github.io/ingress-nginx \
--version ${CHART_VERSION} \
--namespace ingress-nginx \
> ./manifests/nginx-ingress.${APP_VERSION}.yaml
kubectl create namespace ingress-nginx
kubectl apply -f ./manifests/nginx-ingress.${APP_VERSION}.yaml
then deployed
apiVersion: v1
kind: ConfigMap
metadata:
name: service-a
data:
path-a.html: |
"/path-a.html" on service-a
path-b.html: |
"/path-b.html" on service-a
index.html: |
"/" on service-a
404.html: |
service-a 404 page
---
apiVersion: v1
kind: ConfigMap
metadata:
name: service-a-nginx.conf
data:
nginx.conf: |
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: service-a
labels:
app: service-a
spec:
replicas: 1
selector:
matchLabels:
app: service-a
template:
metadata:
labels:
app: service-a
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
volumeMounts:
- name: html
mountPath: "/usr/share/nginx/html/"
- name: config
mountPath: "/etc/nginx/"
volumes:
- name: html
configMap:
name: service-a
- name: config
configMap:
name: service-a-nginx.conf
---
apiVersion: v1
kind: Service
metadata:
name: service-a
spec:
selector:
app: service-a
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: service-a
spec:
ingressClassName: nginx
rules:
- host: app.mydns.net
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: service-a
port:
number: 80
---
and the service is not reachable.
I tested this with kind and using port-forward and a host file pointing at localhost works. So either I am doing something the infra does not support or there is something blocking traffic.
This isn't related to Typhoon, which provides a working Kubernetes cluster and even an example for running an Ingress Controller.
As you say, the controller is running fine and if you're seeing a 404, that means the infra pieces are working.
A warning in the logs you've shown point to the likely issue in your example ingress object.
Ignoring ingress because of error while validating ingress class" ingress="default/nginx-ingress" error="ingress does not contain a valid IngressClass
Description
after running a vanilla cluster, installing the nginx-ingress
with
kubectl apply -f .terraform/modules/bruvio/addons/nginx-ingress/aws
and rbackubectl apply -f .terraform/modules/bruvio/addons/nginx-ingress/aws/rbac
i run a simple ingress nginx
and geting a 404
I see no errors in the pod
and no erros for the controllers
Steps to Reproduce
terraform cluster install nginx-controller from addon folder run nginx ingress deployment using
Expected behavior
curl http/mydns.net/nginx
should return 200Environment
├── provider[registry.terraform.io/hashicorp/aws] 5.46.0 ├── provider[registry.terraform.io/hashicorp/local] ├── provider[registry.terraform.io/poseidon/ct] 0.13.0 └── module.bruvio ├── provider[registry.terraform.io/hashicorp/null] >= 2.1.0 ├── provider[registry.terraform.io/poseidon/ct] ~> 0.13 ├── provider[registry.terraform.io/hashicorp/aws] >= 2.23.0, <= 6.0.0 ├── module.bootstrap │ ├── provider[registry.terraform.io/hashicorp/random] ~> 3.1 │ └── provider[registry.terraform.io/hashicorp/tls] ~> 4.0 └── module.workers ├── provider[registry.terraform.io/hashicorp/aws] >= 2.23.0, <= 6.0.0 └── provider[registry.terraform.io/poseidon/ct] ~> 0.13
Possible Solution
Link to a PR or description.