Comments (32)
I've just gone back to the previous nginx controller I was using based on git sha 3138c71 and this works (although now I can't override the server_names_hash_bucket_size as it's an old version which causes a different issue) however I can see that the nginx config upstream
section does in fact have the correct gogs kubernetes service IP and not server 127.0.0.1:8181;
as the latest version from the logs above does.
So I'm thinking this is bug in the nginx controller?
upstream default-gogs-gogs.default.beast.fabric8.io-gogs {
server 10.233.20.156:80;
}
server {
listen 80;
client_max_body_size 2000M;
server_name gogs.default.beast.fabric8.io;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://default-gogs-gogs.default.beast.fabric8.io-gogs;
}
}
from kubernetes-ingress.
I've just tested the last two versioned nginx-ingress images and checked the upstream sections. They do in fact differ and the 0.3 doesn't have the correct Kubernetes service IP, so I suspect this is a recent regression.
Both were tested using the exact same ingress rule.
nginxdemos/nginx-ingress:0.3
I0726 10:40:13.536967 1 nginx.go:140] Writing NGINX conf to /etc/nginx/conf.d/default-gogs.conf
upstream default-gogs-gogs.default.beast.fabric8.io-gogs {
server 127.0.0.1:8181;
}
nginxdemos/nginx-ingress:0.2
I0726 10:40:13.542624 1 nginx.go:140] Writing NGINX conf to /etc/nginx/conf.d/default-gogs.conf
upstream default-gogs-gogs.default.beast.fabric8.io-gogs {
server 10.233.20.156:80;
}
from kubernetes-ingress.
I tracked it down to this code here https://github.com/nginxinc/kubernetes-ingress/blob/master/nginx-controller/nginx/configurator.go#L210
The port.Port
and servicePort
don't match, in my gogs example the values are:
port.Port=3000
servicePort=80
This is reflected in the gogs service..
apiVersion: v1
kind: Service
metadata:
annotations:
fabric8.io/iconUrl: https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gogs/src/main/fabric8/icon.png
labels:
group: io.fabric8.devops.apps
package: cd-pipeline
project: gogs
provider: fabric8
version: 2.2.218
name: gogs
namespace: default
spec:
clusterIP: 10.233.20.156
ports:
- nodePort: 31095
port: 80
protocol: TCP
targetPort: 3000
selector:
group: io.fabric8.devops.apps
project: gogs
provider: fabric8
sessionAffinity: None
type: LoadBalancer
status:
loadBalancer: {}
It looks like the nginx-controller code gets the port.Port from the kubernetes endpoints and when I check that from the CLI it does in fact use the service targetPort and not the port..
kubectl get endpoints
NAME ENDPOINTS AGE
gogs 10.233.110.2:3000 1d
from kubernetes-ingress.
So it's definitely an issue where the nginx-controller is using the kubernetes Endpoints
resource to set the nginx upstream
config ip address and port which is incorrect. Certainly in my setup the Endpoints use the pod ip and port not the kubernetes Service ip and port which should be used for pod to pod communication.
So either:
- this is a problem with my cluster where for some reason
kubectl get endpoints
returns the pod ip + port and not the kubernetes service details - or the nginx-controller should set the
upstream
section of the nginx config to the kubernetes service and not get the details from the endpoints https://github.com/nginxinc/kubernetes-ingress/blob/master/nginx-controller/nginx/configurator.go#L188
Could someone take a look to confirm if indeed these are the two options please, if it's the latter I'd expect everyone to be affected by it. Thanks in advance.
from kubernetes-ingress.
Thanks for the thorough investigation!
this is a problem with my cluster where for some reason kubectl get endpoints returns the pod ip + port and not the kubernetes service details
an endpoint must contain the IP address of a pod + targetPort . The output from kubectl get endpoints
command looks correct.
or the nginx-controller should set the upstream section of the nginx config to the kubernetes service and not get the details from the endpoints https://github.com/nginxinc/kubernetes-ingress/blob/master/nginx-controller/nginx/configurator.go#L188
This is a bug in the controller, it should've used the target port instead of service port.
As a temporal workaround I suggest to change the port in your Ingress resouce from the service port 80 to the targetport 3000. Does it help? In the mean time I provide a bug fix
from kubernetes-ingress.
Yes changing the Ingress servicePort to match the targetPort works, this is a decent workaround, thanks.
from kubernetes-ingress.
I think I'm seeing this same issue but noticed via another symptom. Because requests aren't forwarded to the Service IP:port, they are not load-balanced across pods. All requests into the load balancer are forwarded to a single pod.
(Also, how do I configure the Controller to output the more detailed logs, as in the comments above?)
from kubernetes-ingress.
the port mapping issue was fixed in #54
from kubernetes-ingress.
thanks @pleshakov
Can I just check something please? Has that fix been released in dockerhub? Only our GKE instances have started to fail for new deployments and I'm wondering if this fix has been pushed and replaced the 0.3 tag in dockerhub?
from kubernetes-ingress.
yes, it did get pushed to the dockerhub. Is the failing related to the port mapping?
I will update the tag 0.3 to the previous version and push the new one with the 0.3.1 tag, since the update may affect some users because of the port mapping changes. Thanks for pointing that out!
from kubernetes-ingress.
The issue with incorrect upstream is still present.
from kubernetes-ingress.
[root@localhost ~]# kubectl logs ingress-nginx-1948358904-sqhb4 --namespace=fabric8-system
\I1013 21:03:35.436652 1 nginx.go:240] Writing NGINX conf to /etc/nginx/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 {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server_names_hash_max_size 512;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
include /etc/nginx/conf.d/*.conf;
}
I1013 21:03:35.442537 1 nginx.go:258] The main NGINX configuration file had been updated
I1013 21:03:35.442591 1 nginx.go:213] executing nginx
I1013 21:03:37.706976 1 controller.go:143] Adding endpoints: fabric8-docker-registry
I1013 21:03:37.706995 1 controller.go:143] Adding endpoints: fabric8-forge
I1013 21:03:37.707002 1 controller.go:143] Adding endpoints: gogs
I1013 21:03:37.707007 1 controller.go:143] Adding endpoints: kubernetes
I1013 21:03:37.707012 1 controller.go:143] Adding endpoints: heapster
I1013 21:03:37.707017 1 controller.go:143] Adding endpoints: monitoring-grafana
I1013 21:03:37.707022 1 controller.go:143] Adding endpoints: monitoring-influxdb
I1013 21:03:37.707027 1 controller.go:143] Adding endpoints: jenkinshift
I1013 21:03:37.707033 1 controller.go:143] Adding endpoints: jenkins
I1013 21:03:37.707040 1 controller.go:143] Adding endpoints: jenkins-jnlp
I1013 21:03:37.707045 1 controller.go:143] Adding endpoints: elasticsearch-logging
I1013 21:03:37.707050 1 controller.go:143] Adding endpoints: kibana-logging
I1013 21:03:37.707055 1 controller.go:143] Adding endpoints: kube-dns
I1013 21:03:37.707062 1 controller.go:143] Adding endpoints: nexus
I1013 21:03:37.707095 1 controller.go:143] Adding endpoints: kubedash
I1013 21:03:37.707101 1 controller.go:143] Adding endpoints: kubernetes-dashboard
I1013 21:03:37.707106 1 controller.go:143] Adding endpoints: fabric8
I1013 21:03:37.707111 1 controller.go:143] Adding endpoints: gogs-ssh
I1013 21:03:37.707118 1 utils.go:70] Syncing fabric8/fabric8-docker-registry
I1013 21:03:37.707125 1 controller.go:275] Syncing endpoints fabric8/fabric8-docker-registry
I1013 21:03:37.707132 1 utils.go:70] Syncing fabric8/fabric8-forge
I1013 21:03:37.707135 1 controller.go:275] Syncing endpoints fabric8/fabric8-forge
I1013 21:03:37.707139 1 utils.go:70] Syncing fabric8/gogs
I1013 21:03:37.707142 1 controller.go:275] Syncing endpoints fabric8/gogs
I1013 21:03:37.707146 1 utils.go:70] Syncing default/kubernetes
I1013 21:03:37.707149 1 controller.go:275] Syncing endpoints default/kubernetes
I1013 21:03:37.707153 1 utils.go:70] Syncing kube-system/heapster
I1013 21:03:37.707155 1 controller.go:275] Syncing endpoints kube-system/heapster
I1013 21:03:37.707160 1 utils.go:70] Syncing kube-system/monitoring-grafana
I1013 21:03:37.707162 1 controller.go:275] Syncing endpoints kube-system/monitoring-grafana
I1013 21:03:37.707166 1 utils.go:70] Syncing kube-system/monitoring-influxdb
I1013 21:03:37.707169 1 controller.go:275] Syncing endpoints kube-system/monitoring-influxdb
I1013 21:03:37.707173 1 utils.go:70] Syncing fabric8/jenkinshift
I1013 21:03:37.707175 1 controller.go:275] Syncing endpoints fabric8/jenkinshift
I1013 21:03:37.707179 1 utils.go:70] Syncing fabric8/jenkins
I1013 21:03:37.707182 1 controller.go:275] Syncing endpoints fabric8/jenkins
I1013 21:03:37.707186 1 utils.go:70] Syncing fabric8/jenkins-jnlp
I1013 21:03:37.707188 1 controller.go:275] Syncing endpoints fabric8/jenkins-jnlp
I1013 21:03:37.707192 1 utils.go:70] Syncing kube-system/elasticsearch-logging
I1013 21:03:37.707195 1 controller.go:275] Syncing endpoints kube-system/elasticsearch-logging
I1013 21:03:37.707199 1 utils.go:70] Syncing kube-system/kibana-logging
I1013 21:03:37.707202 1 controller.go:275] Syncing endpoints kube-system/kibana-logging
I1013 21:03:37.707206 1 utils.go:70] Syncing kube-system/kube-dns
I1013 21:03:37.707208 1 controller.go:275] Syncing endpoints kube-system/kube-dns
I1013 21:03:37.707212 1 utils.go:70] Syncing fabric8/nexus
I1013 21:03:37.707215 1 controller.go:275] Syncing endpoints fabric8/nexus
I1013 21:03:37.707219 1 utils.go:70] Syncing kube-system/kubedash
I1013 21:03:37.707221 1 controller.go:275] Syncing endpoints kube-system/kubedash
I1013 21:03:37.707225 1 utils.go:70] Syncing kube-system/kubernetes-dashboard
I1013 21:03:37.707228 1 controller.go:275] Syncing endpoints kube-system/kubernetes-dashboard
I1013 21:03:37.707352 1 utils.go:70] Syncing fabric8/fabric8
I1013 21:03:37.707359 1 controller.go:275] Syncing endpoints fabric8/fabric8
I1013 21:03:37.707365 1 utils.go:70] Syncing fabric8/gogs-ssh
I1013 21:03:37.707368 1 controller.go:275] Syncing endpoints fabric8/gogs-ssh
I1013 21:03:37.709512 1 controller.go:85] Adding Ingress: fabric8
I1013 21:03:37.709591 1 controller.go:85] Adding Ingress: gogs-ssh
I1013 21:03:37.709601 1 controller.go:85] Adding Ingress: jenkins-jnlp
I1013 21:03:37.709607 1 controller.go:85] Adding Ingress: jenkinshift
I1013 21:03:37.709612 1 controller.go:85] Adding Ingress: nexus
I1013 21:03:37.709618 1 controller.go:85] Adding Ingress: fabric8-docker-registry
I1013 21:03:37.709623 1 controller.go:85] Adding Ingress: fabric8-forge
I1013 21:03:37.709676 1 controller.go:85] Adding Ingress: jenkins
I1013 21:03:37.709690 1 controller.go:85] Adding Ingress: gogs
I1013 21:03:37.709699 1 utils.go:70] Syncing fabric8/fabric8
I1013 21:03:37.709703 1 controller.go:334] Syncing fabric8/fabric8
I1013 21:03:37.709708 1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8
I1013 21:03:37.709789 1 controller.go:436] Error getting service fabric8: service fabric8/fabric8 doesn't exists
W1013 21:03:37.709801 1 controller.go:423] Error retrieving endpoints for the service fabric8: service fabric8/fabric8 doesn't exists
I1013 21:03:37.709823 1 nginx.go:108] Updating NGINX configuration
upstream fabric8-fabric8-fabric8.fabric8.cluster.local-fabric8 {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name fabric8.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 60s;
proxy_read_timeout 60s;
client_max_body_size 1m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-fabric8-fabric8.fabric8.cluster.local-fabric8;
}
}
I1013 21:03:37.719800 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8.conf
I1013 21:03:37.720050 1 controller.go:117] Adding service: jenkins
I1013 21:03:37.720076 1 controller.go:117] Adding service: monitoring-influxdb
I1013 21:03:37.720105 1 controller.go:368] ignoring service monitoring-influxdb: No ingress for service monitoring-influxdb
I1013 21:03:37.720113 1 controller.go:117] Adding service: fabric8-docker-registry
I1013 21:03:37.720120 1 controller.go:117] Adding service: fabric8-forge
I1013 21:03:37.720127 1 controller.go:117] Adding service: gogs-ssh
I1013 21:03:37.720134 1 controller.go:117] Adding service: jenkins-jnlp
I1013 21:03:37.720159 1 controller.go:117] Adding service: kubernetes-dashboard
I1013 21:03:37.720164 1 controller.go:368] ignoring service kubernetes-dashboard: No ingress for service kubernetes-dashboard
I1013 21:03:37.720169 1 controller.go:117] Adding service: fabric8
I1013 21:03:37.720178 1 controller.go:117] Adding service: gogs
I1013 21:03:37.720185 1 controller.go:117] Adding service: jenkinshift
I1013 21:03:37.720192 1 controller.go:117] Adding service: nexus
I1013 21:03:37.720199 1 controller.go:117] Adding service: elasticsearch-logging
I1013 21:03:37.720203 1 controller.go:368] ignoring service elasticsearch-logging: No ingress for service elasticsearch-logging
I1013 21:03:37.720208 1 controller.go:117] Adding service: kube-dns
I1013 21:03:37.720212 1 controller.go:368] ignoring service kube-dns: No ingress for service kube-dns
I1013 21:03:37.720219 1 controller.go:117] Adding service: kubedash
I1013 21:03:37.720224 1 controller.go:368] ignoring service kubedash: No ingress for service kubedash
I1013 21:03:37.720228 1 controller.go:117] Adding service: monitoring-grafana
I1013 21:03:37.720297 1 controller.go:368] ignoring service monitoring-grafana: No ingress for service monitoring-grafana
I1013 21:03:37.720307 1 controller.go:117] Adding service: kubernetes
I1013 21:03:37.720312 1 controller.go:368] ignoring service kubernetes: No ingress for service kubernetes
I1013 21:03:37.720316 1 controller.go:117] Adding service: heapster
I1013 21:03:37.720321 1 controller.go:368] ignoring service heapster: No ingress for service heapster
I1013 21:03:37.720325 1 controller.go:117] Adding service: kibana-logging
I1013 21:03:37.720329 1 controller.go:368] ignoring service kibana-logging: No ingress for service kibana-logging
I1013 21:03:37.722619 1 controller.go:178] Adding ConfigMap: nginx-config
I1013 21:03:37.722736 1 utils.go:70] Syncing fabric8-system/nginx-config
I1013 21:03:37.722746 1 controller.go:297] Syncing configmap fabric8-system/nginx-config
I1013 21:03:37.723439 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.723553 1 nginx.go:213] executing nginx -t
I1013 21:03:37.757461 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 19#19: signal process started
I1013 21:03:37.764115 1 utils.go:70] Syncing fabric8/gogs-ssh
I1013 21:03:37.764159 1 controller.go:334] Syncing fabric8/gogs-ssh
I1013 21:03:37.764173 1 controller.go:349] Adding or Updating Ingress: fabric8/gogs-ssh
I1013 21:03:37.764218 1 controller.go:448] Error getting endpoints for service gogs-ssh port {0 2222 }: No port {0 2222 } in service gogs-ssh
W1013 21:03:37.764459 1 controller.go:423] Error retrieving endpoints for the service gogs-ssh: No port {0 2222 } in service gogs-ssh
I1013 21:03:37.764497 1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.767371 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-gogs-ssh.conf
I1013 21:03:37.768007 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.768084 1 nginx.go:213] executing nginx -t
upstream fabric8-gogs-ssh-gogs-ssh.fabric8.cluster.local-gogs-ssh {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name gogs-ssh.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 60s;
proxy_read_timeout 60s;
client_max_body_size 1m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-gogs-ssh-gogs-ssh.fabric8.cluster.local-gogs-ssh;
}
}
I1013 21:03:37.785456 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 24#24: signal process started
I1013 21:03:37.793741 1 utils.go:70] Syncing fabric8/jenkins-jnlp
I1013 21:03:37.793762 1 controller.go:334] Syncing fabric8/jenkins-jnlp
I1013 21:03:37.793771 1 controller.go:349] Adding or Updating Ingress: fabric8/jenkins-jnlp
I1013 21:03:37.793815 1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.794099 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkins-jnlp.conf
I1013 21:03:37.794727 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.794774 1 nginx.go:213] executing nginx -t
upstream fabric8-jenkins-jnlp-jenkins-jnlp.fabric8.cluster.local-jenkins-jnlp {
server 172.16.82.9:50000;
}
server {
listen 80;
server_name jenkins-jnlp.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 60s;
proxy_read_timeout 60s;
client_max_body_size 1m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-jenkins-jnlp-jenkins-jnlp.fabric8.cluster.local-jenkins-jnlp;
}
}
I1013 21:03:37.803803 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 28#28: signal process started
I1013 21:03:37.813758 1 utils.go:70] Syncing fabric8/jenkinshift
I1013 21:03:37.813785 1 controller.go:334] Syncing fabric8/jenkinshift
I1013 21:03:37.813794 1 controller.go:349] Adding or Updating Ingress: fabric8/jenkinshift
I1013 21:03:37.813832 1 controller.go:448] Error getting endpoints for service jenkinshift port {0 9191 }: No port {0 9191 } in service jenkinshift
W1013 21:03:37.813842 1 controller.go:423] Error retrieving endpoints for the service jenkinshift: No port {0 9191 } in service jenkinshift
I1013 21:03:37.814002 1 nginx.go:108] Updating NGINX configuration
upstream fabric8-jenkinshift-jenkinshift.fabric8.cluster.local-jenkinshift {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name jenkinshift.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 60s;
proxy_read_timeout 60s;
client_max_body_size 1m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-jenkinshift-jenkinshift.fabric8.cluster.local-jenkinshift;
}
}
I1013 21:03:37.814425 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkinshift.conf
I1013 21:03:37.814861 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.814882 1 nginx.go:213] executing nginx -t
I1013 21:03:37.824927 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 32#32: signal process started
I1013 21:03:37.832921 1 utils.go:70] Syncing fabric8/nexus
I1013 21:03:37.832954 1 controller.go:334] Syncing fabric8/nexus
I1013 21:03:37.832967 1 controller.go:349] Adding or Updating Ingress: fabric8/nexus
I1013 21:03:37.833026 1 controller.go:448] Error getting endpoints for service nexus port {0 8081 }: No port {0 8081 } in service nexus
W1013 21:03:37.833042 1 controller.go:423] Error retrieving endpoints for the service nexus: No port {0 8081 } in service nexus
I1013 21:03:37.833066 1 nginx.go:108] Updating NGINX configuration
upstream fabric8-nexus-nexus.fabric8.cluster.local-nexus {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name nexus.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 60s;
proxy_read_timeout 60s;
client_max_body_size 1m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-nexus-nexus.fabric8.cluster.local-nexus;
}
}
I1013 21:03:37.833672 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-nexus.conf
I1013 21:03:37.834196 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.834218 1 nginx.go:213] executing nginx -t
I1013 21:03:37.849163 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 36#36: signal process started
I1013 21:03:37.857008 1 utils.go:70] Syncing fabric8/fabric8-docker-registry
I1013 21:03:37.857671 1 controller.go:334] Syncing fabric8/fabric8-docker-registry
I1013 21:03:37.857689 1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8-docker-registry
I1013 21:03:37.857720 1 nginx.go:240] Writing NGINX conf to /etc/nginx/nginx.conf
I1013 21:03:37.857722 1 controller.go:448] Error getting endpoints for service fabric8-docker-registry port {0 5000 }: No port {0 5000 } in service fabric8-docker-registry
W1013 21:03:37.857783 1 controller.go:423] Error retrieving endpoints for the service fabric8-docker-registry: No port {0 5000 } in service fabric8-docker-registry
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server_names_hash_max_size 1024;
server_names_hash_bucket_size 256;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
include /etc/nginx/conf.d/*.conf;
}
upstream fabric8-fabric8-docker-registry-fabric8-docker-registry.fabric8.cluster.local-fabric8-docker-registry {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name fabric8-docker-registry.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-fabric8-docker-registry-fabric8-docker-registry.fabric8.cluster.local-fabric8-docker-registry;
}
}
I1013 21:03:37.857911 1 nginx.go:258] The main NGINX configuration file had been updated
I1013 21:03:37.858166 1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.858520 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8-docker-registry.conf
I1013 21:03:37.859125 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.859141 1 nginx.go:213] executing nginx -t
I1013 21:03:37.882220 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 41#41: signal process started
I1013 21:03:37.891204 1 utils.go:70] Syncing fabric8/fabric8-forge
I1013 21:03:37.891228 1 controller.go:334] Syncing fabric8/fabric8-forge
I1013 21:03:37.891267 1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8-forge
I1013 21:03:37.891302 1 controller.go:448] Error getting endpoints for service fabric8-forge port {0 8080 }: No port {0 8080 } in service fabric8-forge
W1013 21:03:37.891311 1 controller.go:423] Error retrieving endpoints for the service fabric8-forge: No port {0 8080 } in service fabric8-forge
I1013 21:03:37.891327 1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.891955 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8-forge.conf
upstream fabric8-fabric8-forge-fabric8-forge.fabric8.cluster.local-fabric8-forge {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name fabric8-forge.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-fabric8-forge-fabric8-forge.fabric8.cluster.local-fabric8-forge;
}
}
I1013 21:03:37.893166 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.893184 1 nginx.go:213] executing nginx -t
I1013 21:03:37.909329 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 45#45: signal process started
I1013 21:03:37.918322 1 utils.go:70] Syncing fabric8/jenkins
I1013 21:03:37.918356 1 controller.go:334] Syncing fabric8/jenkins
I1013 21:03:37.918368 1 controller.go:349] Adding or Updating Ingress: fabric8/jenkins
I1013 21:03:37.918407 1 controller.go:448] Error getting endpoints for service jenkins port {0 8080 }: No port {0 8080 } in service jenkins
W1013 21:03:37.918416 1 controller.go:423] Error retrieving endpoints for the service jenkins: No port {0 8080 } in service jenkins
I1013 21:03:37.918437 1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.918693 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkins.conf
upstream fabric8-jenkins-jenkins.fabric8.cluster.local-jenkins {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name jenkins.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-jenkins-jenkins.fabric8.cluster.local-jenkins;
}
}
I1013 21:03:37.926156 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.927928 1 nginx.go:213] executing nginx -t
I1013 21:03:37.936540 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 49#49: signal process started
I1013 21:03:37.944579 1 utils.go:70] Syncing fabric8/gogs
I1013 21:03:37.944600 1 controller.go:334] Syncing fabric8/gogs
I1013 21:03:37.944609 1 controller.go:349] Adding or Updating Ingress: fabric8/gogs
I1013 21:03:37.944641 1 controller.go:448] Error getting endpoints for service gogs port {0 3000 }: No port {0 3000 } in service gogs
W1013 21:03:37.944649 1 controller.go:423] Error retrieving endpoints for the service gogs: No port {0 3000 } in service gogs
I1013 21:03:37.944665 1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.944953 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-gogs.conf
upstream fabric8-gogs-gogs.fabric8.cluster.local-gogs {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name gogs.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-gogs-gogs.fabric8.cluster.local-gogs;
}
}
I1013 21:03:37.945423 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.945928 1 nginx.go:213] executing nginx -t
I1013 21:03:37.955342 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 53#53: signal process started
I1013 21:03:37.963360 1 utils.go:70] Syncing fabric8/fabric8
I1013 21:03:37.963384 1 controller.go:334] Syncing fabric8/fabric8
I1013 21:03:37.963393 1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8
I1013 21:03:37.963427 1 controller.go:448] Error getting endpoints for service fabric8 port {0 9090 }: No port {0 9090 } in service fabric8
W1013 21:03:37.963442 1 controller.go:423] Error retrieving endpoints for the service fabric8: No port {0 9090 } in service fabric8
I1013 21:03:37.963460 1 nginx.go:108] Updating NGINX configuration
upstream fabric8-fabric8-fabric8.fabric8.cluster.local-fabric8 {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name fabric8.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-fabric8-fabric8.fabric8.cluster.local-fabric8;
}
}
I1013 21:03:37.963727 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8.conf
I1013 21:03:37.964126 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.964189 1 nginx.go:213] executing nginx -t
I1013 21:03:37.977390 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 57#57: signal process started
I1013 21:03:37.988544 1 utils.go:70] Syncing fabric8/gogs-ssh
I1013 21:03:37.988571 1 controller.go:334] Syncing fabric8/gogs-ssh
I1013 21:03:37.988581 1 controller.go:349] Adding or Updating Ingress: fabric8/gogs-ssh
I1013 21:03:37.988616 1 controller.go:448] Error getting endpoints for service gogs-ssh port {0 2222 }: No port {0 2222 } in service gogs-ssh
W1013 21:03:37.988629 1 controller.go:423] Error retrieving endpoints for the service gogs-ssh: No port {0 2222 } in service gogs-ssh
I1013 21:03:37.988651 1 nginx.go:108] Updating NGINX configuration
upstream fabric8-gogs-ssh-gogs-ssh.fabric8.cluster.local-gogs-ssh {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name gogs-ssh.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-gogs-ssh-gogs-ssh.fabric8.cluster.local-gogs-ssh;
}
}
I1013 21:03:37.989056 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-gogs-ssh.conf
I1013 21:03:37.989512 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.989578 1 nginx.go:213] executing nginx -t
I1013 21:03:38.003927 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 62#62: signal process started
I1013 21:03:38.012020 1 utils.go:70] Syncing fabric8/nexus
I1013 21:03:38.012048 1 controller.go:334] Syncing fabric8/nexus
I1013 21:03:38.012057 1 controller.go:349] Adding or Updating Ingress: fabric8/nexus
I1013 21:03:38.012102 1 controller.go:448] Error getting endpoints for service nexus port {0 8081 }: No port {0 8081 } in service nexus
W1013 21:03:38.012115 1 controller.go:423] Error retrieving endpoints for the service nexus: No port {0 8081 } in service nexus
I1013 21:03:38.012131 1 nginx.go:108] Updating NGINX configuration
upstream fabric8-nexus-nexus.fabric8.cluster.local-nexus {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name nexus.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-nexus-nexus.fabric8.cluster.local-nexus;
}
}
I1013 21:03:38.012569 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-nexus.conf
I1013 21:03:38.012900 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:38.012968 1 nginx.go:213] executing nginx -t
I1013 21:03:38.023058 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 66#66: signal process started
I1013 21:03:38.031124 1 utils.go:70] Syncing fabric8/jenkins-jnlp
I1013 21:03:38.031173 1 controller.go:334] Syncing fabric8/jenkins-jnlp
I1013 21:03:38.031183 1 controller.go:349] Adding or Updating Ingress: fabric8/jenkins-jnlp
I1013 21:03:38.031266 1 nginx.go:108] Updating NGINX configuration
I1013 21:03:38.032503 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkins-jnlp.conf
upstream fabric8-jenkins-jnlp-jenkins-jnlp.fabric8.cluster.local-jenkins-jnlp {
server 172.16.82.9:50000;
}
server {
listen 80;
server_name jenkins-jnlp.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-jenkins-jnlp-jenkins-jnlp.fabric8.cluster.local-jenkins-jnlp;
}
}
I1013 21:03:38.032834 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:38.032948 1 nginx.go:213] executing nginx -t
I1013 21:03:38.046180 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 70#70: signal process started
I1013 21:03:38.055664 1 utils.go:70] Syncing fabric8/jenkinshift
I1013 21:03:38.055690 1 controller.go:334] Syncing fabric8/jenkinshift
I1013 21:03:38.055699 1 controller.go:349] Adding or Updating Ingress: fabric8/jenkinshift
I1013 21:03:38.055734 1 controller.go:448] Error getting endpoints for service jenkinshift port {0 9191 }: No port {0 9191 } in service jenkinshift
W1013 21:03:38.055753 1 controller.go:423] Error retrieving endpoints for the service jenkinshift: No port {0 9191 } in service jenkinshift
I1013 21:03:38.055778 1 nginx.go:108] Updating NGINX configuration
I1013 21:03:38.056027 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkinshift.conf
upstream fabric8-jenkinshift-jenkinshift.fabric8.cluster.local-jenkinshift {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name jenkinshift.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-jenkinshift-jenkinshift.fabric8.cluster.local-jenkinshift;
}
}
I1013 21:03:38.056500 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:38.056566 1 nginx.go:213] executing nginx -t
I1013 21:03:38.066161 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 74#74: signal process started
I1013 21:03:38.073886 1 utils.go:70] Syncing fabric8/fabric8-docker-registry
I1013 21:03:38.073907 1 controller.go:334] Syncing fabric8/fabric8-docker-registry
I1013 21:03:38.073916 1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8-docker-registry
I1013 21:03:38.073950 1 controller.go:448] Error getting endpoints for service fabric8-docker-registry port {0 5000 }: No port {0 5000 } in service fabric8-docker-registry
W1013 21:03:38.073960 1 controller.go:423] Error retrieving endpoints for the service fabric8-docker-registry: No port {0 5000 } in service fabric8-docker-registry
I1013 21:03:38.073985 1 nginx.go:108] Updating NGINX configuration
upstream fabric8-fabric8-docker-registry-fabric8-docker-registry.fabric8.cluster.local-fabric8-docker-registry {
server 127.0.0.1:8181;
}
server {
listen 80;
server_name fabric8-docker-registry.fabric8.cluster.local;
location / {
proxy_http_version 1.1;
proxy_connect_timeout 10s;
proxy_read_timeout 10s;
client_max_body_size 2000m;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://fabric8-fabric8-docker-registry-fabric8-docker-registry.fabric8.cluster.local-fabric8-docker-registry;
}
}
I1013 21:03:38.074262 1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8-docker-registry.conf
I1013 21:03:38.074572 1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:38.074632 1 nginx.go:213] executing nginx -t
I1013 21:03:38.082571 1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 78#78: signal process started
(reverse-i-search)`ingress': kubectl get deployment ingress-nginx --namespace=fabric8-system -o yaml > ^Cgress-nginx.yml
[root@localhost ~]# kubectl get endpoints
NAME ENDPOINTS AGE
fabric8 172.16.71.5:9090 1h
fabric8-docker-registry 172.16.82.5:5000 1h
fabric8-forge 172.16.82.8:8080 1h
gogs 172.16.82.7:3000 1h
gogs-ssh 172.16.82.7:2222 1h
jenkins 172.16.82.9:8080 1h
jenkins-jnlp 172.16.82.9:50000 1h
jenkinshift 172.16.71.5:9191 1h
nexus 172.16.82.6:8081 1h
[root@localhost ~]# kubectl get svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
fabric8 10.254.132.99 nodes 80/TCP 1h
fabric8-docker-registry 10.254.199.48 <none> 80/TCP 1h
fabric8-forge 10.254.27.65 <none> 80/TCP 1h
gogs 10.254.32.167 <none> 80/TCP 1h
gogs-ssh 10.254.79.197 <none> 22/TCP 1h
jenkins 10.254.5.237 <none> 80/TCP 1h
jenkins-jnlp 10.254.74.189 <none> 50000/TCP 1h
jenkinshift 10.254.120.57 <none> 80/TCP 1h
nexus 10.254.2.109 <none> 80/TCP 1h
from kubernetes-ingress.
I'm using image v0.3.1.
Only enpoint with the port same to service was detected correctly.
from kubernetes-ingress.
@comeanother could you provide the ingress resource for fabric8/fabric8-docker-registry or fabric8/jenkinshift ?
The correct behaviour is the following: the port specified in an Ingress resource (by the name or the port number) must much the port declared in the corresponding service file.
from kubernetes-ingress.
Sorry, these are the correct one
[root@localhost ~]# kubectl get ingress
NAME RULE BACKEND ADDRESS AGE
fabric8 - 2h
fabric8.fabric8.cluster.local
fabric8:9090
fabric8-docker-registry - 2h
fabric8-docker-registry.fabric8.cluster.local
fabric8-docker-registry:5000
fabric8-forge - 2h
fabric8-forge.fabric8.cluster.local
fabric8-forge:8080
gogs - 2h
gogs.fabric8.cluster.local
gogs:3000
gogs-ssh - 2h
gogs-ssh.fabric8.cluster.local
gogs-ssh:2222
jenkins - 2h
jenkins.fabric8.cluster.local
jenkins:8080
jenkins-jnlp - 2h
jenkins-jnlp.fabric8.cluster.local
jenkins-jnlp:50000
jenkinshift - 2h
jenkinshift.fabric8.cluster.local
jenkinshift:9191
nexus - 2h
nexus.fabric8.cluster.local
nexus:8081
from kubernetes-ingress.
Am I right: port declared in ingress must match port (not target port) declared in service?
from kubernetes-ingress.
You're right.
version 0.3 and before (incorrect behavior): port declared in ingress must match the target port declared in service
version 0.3.1 (correct behavior): port declared in ingress must match port (not target port) declared in service
from kubernetes-ingress.
@pleshakov @comeanother I'm one of the fabric8 committers and created the exposecontroller that generates the ingress rules in the sample above.
we originally had to use the target port until this current issue was fixed as the code explains here https://github.com/fabric8io/exposecontroller/blob/master/exposestrategy/ingress.go#L86
but my guess is that this fix was originally pushed to the 0.3 tag which has since been reverted and moved to 3.1 (I think that's right)
on the fabric8 project we will need to update the exposecontroller to work with this fix and version 3.1 of the nginx ingress controller.
from kubernetes-ingress.
@rawlingsj I installed two fabric8 environments.
The first (older) igresses are using targetPorts.
The second (newer) ingresses are all using only 80 port.
Is that suppose to be?
Older environment I installed about 6 hours ago and newer about an hour ago.
from kubernetes-ingress.
@rawlingsj correct, the fix was applied to 0.3 initially, but then the 0.3 image has been reverted to the previous version.
The fix was applied to 0.3.1 image
from kubernetes-ingress.
@comeanother until we update exposecontroller and perform a fabric8 release which includes the upgrade to nginxdemos/nginx-ingress:0.3.1 then we will need to stick to using targetPorts and 0.3
As @pleshakov just confirmed the issue here is that the nginxdemos/nginx-ingress:0.3
tag was working but for a short amount of time had a change pushed over it which has since been reverted see #56
I can try to update fabric8 to use the 0.3.1 tag but in the interest of time the easiest approach I think would be to force a
docker pull nginxdemos/nginx-ingress:0.3
on the node that's running the pod or if no ssh access change the pull policy of the ingress controller deployment in the fabric8-system namespace to Always
from kubernetes-ingress.
@rawlingsj I'm trying now
from kubernetes-ingress.
@rawlingsj Still no luck. 'server 127.0.0.1:8181' in the upstreams.
Do you have an issue in your repository, so we can continue there?
from kubernetes-ingress.
@pleshakov thanks for the quick and great responses BTW!
I had a quick look at updating the ingress rule in our exposecontroller but I wasn't 100% what I needed to change to with this port mapping fix. Where I was using a targetPort
before should this now be port.Port
?
https://github.com/fabric8io/exposecontroller/blob/master/exposestrategy/ingress.go#L85-L86
from kubernetes-ingress.
@rawlingsj Yes,
version 0.3.1 (correct behavior): port declared in ingress must match port (not target port) declared in service
from kubernetes-ingress.
@comeanother fabric8 can update that mapping and reference the new version of nginxdemos/nginx-ingress:0.3.1 but that's going to require a new fabric8 release which can't happen until tomorrow and providing everything works. (it's gone 11 pm here in the UK)
Regardless of the changes needed you shouldn't be affected by this if you've been able to pull the 0.3 tag again, now that the change has been reverted.
from kubernetes-ingress.
@comeanother please redeploy the Ingress controller. The 0.3 wasn't fixed by mistake.
from kubernetes-ingress.
Thanks @pleshakov Now 0.3 is working.
I'll test 0.3.1 soon.
from kubernetes-ingress.
0.3.1 tested successfully - thanks @pleshakov!
from kubernetes-ingress.
server {
listen 80;
server_name example1.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
server {
listen 80;
server_name example2.com;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Error Log :
2020/03/17 14:13:44 [error] 1880#1880: *88 connect() failed (111: Connection refused) while connecting to upstream, client: 157.37.238.120, server: example1.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "www.example1.com"
2020/03/17 14:13:44 [error] 1880#1880: *88 connect() failed (111: Connection refused) while connecting to upstream, client: 157.37.238.120, server: example.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "www.example1.com", referrer: "http://www.example1.com/"
from kubernetes-ingress.
kubectl get endpoints
Have you been able to make it work ?
I am still unable to (#8207)
from kubernetes-ingress.
@vikomte the issue you link to is the K8s community nginx ingress controller project. Which is distinct in function and notation from this one.
Can you please clarify which you are deploying?
from kubernetes-ingress.
Related Issues (20)
- Re-add FIPS related images to tests, image patching & release process HOT 1
- Release NGINX Ingress Controller 3.6.1
- Report NGINX Ingress Controller Configmap Keys HOT 1
- Report BUILD_OS of NGINX Ingress Controller HOT 1
- 3.6.0/3.6.1 nginx ingress controller not working || dial unix /var/lib/nginx/nginx-config-version.sock: connect: no such file or directory HOT 16
- Supported Kubernetes versions table is confusing HOT 2
- AWS EKS Add-on support HOT 1
- POC - Add `ip` as an option to listeners HOT 2
- Add `ipFamily` as an option to listeners HOT 1
- Allow NIC to be presented as an Add-on for AWS EKS clusters HOT 1
- Pin NAP WAF module HOT 2
- POC - Create specific Helm chart for AWS EKS Add-on support
- WAF v5 + NIC Blog post HOT 1
- Move DoS related images from UBI8 to UBI9 HOT 1
- Ingress Controller Path and Rewrites HOT 3
- State explicitly that WAF v5 is currently supported by VS/VSR HOT 1
- Templating nginx.ingress.tmpl proxy_pass not set when backend-protocol annotation is set HOT 5
- Update nginx go client and prometheus common libs HOT 2
- nginx.org/rewrites regular $1 rewrite is not supported HOT 7
- dlopen() "/etc/nginx/modules/ngx_http_js_module.so" failed (/etc/nginx/modules/ngx_http_js_module.so: cannot open shared object file: No such file or directory HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubernetes-ingress.