kubernetes ingress problems, how can i solve this?
Hello Everyone, I’m new around and learning Kubernetes as my next step in the world of the apps, I have created 2 simple apps, using the hashicorp/http-echo, one for an echo of apple and one for banana.
Then I created a new ingress resource that looks like this
apiVersion: extensions/v1beta1 kind: Ingress metadata: name: example-ingress annotations: ingress.kubernetes.io/rewrite-target: / spec: rules: - http: paths: - path: /apple backend: serviceName: apple-service servicePort: 5678 - path: /banana backend: serviceName: banana-service servicePort: 5678
When I launched I’m unable to get anything from the loadbalancer IP, I though it was cert problem, So I went to the LoadBalancer and added a port fowarding rule with the https and added a cert in there using digital ocean itself(not sure if this was correct or I should create a cert manager in kubernetes itself)
when I use kubectl get svc I get
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE apple-service ClusterIP 10.245.160.161 <none> 5678/TCP 18m banana-service ClusterIP 10.245.1.95 <none> 5678/TCP 26m kubernetes ClusterIP 10.245.0.1 <none> 443/TCP 57m nginx-ingress-controller LoadBalancer 10.245.191.196 22.214.171.124 80:30097/TCP,443:30260/TCP 49m nginx-ingress-default-backend ClusterIP 10.245.45.171 <none> 80/TCP
and kubectl describe ingress gives me
Name: example-ingress Namespace: default Address: 126.96.36.199 Default backend: default-http-backend:80 (<none>) Rules: Host Path Backends ---- ---- -------- * /apple apple-service:5678 (<none>) /banana banana-service:5678 (<none>) Annotations: ingress.kubernetes.io/rewrite-target: / Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal CREATE 23m nginx-ingress-controller Ingress default/example-ingress Normal UPDATE 23m nginx-ingress-controller Ingress default/example-ingress
The problem is that first, my Loadbalancer IP is not that one, is 188.8.131.52 and the current IP shown is pointing to one of the nodes, I have 3. And after that any IP i Try will just give me a 400 error.
Can anyone give me some guidance?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×