Istio Gateway With multiple ports | service is responding only on port 80
up vote
0
down vote
favorite
Hey so I configured gateway for port 80 and 8083 for same domain i-e example.com
. Now when I create attributes using below config file everything get up and running.
issue is I am using 8083
in service and virtualService but I get response from service at 80
where on 8083
getting connection timeout.
Unable to understand why service is responding on 80 not 8083. I want to keep both ports in gateway but when define in service and ingress port 8083 it should response on specifically on 8083.
Would appreciate your feedback in this.
apiVersion: v1
data:
my.databag.1: need_triage
kind: ConfigMap
metadata:
name: my-service-env-variables
namespace: api
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: my-service
name: my-service-service-deployment
namespace: api
spec:
replicas: 1
template:
metadata:
annotations:
traffic.sidecar.istio.io/excludeOutboundIPRanges: 0.0.0.0/0
labels:
app: my-service-service-deployment
spec:
containers:
- env:
- name: my.variable
valueFrom:
secretKeyRef:
key: my_token
name: my.variable
envFrom:
- configMapRef:
name: my-service-env-variables
image: imaagepath:tag
name: my-service-pod
ports:
- containerPort: 8080
name: mysvcport
resources:
limits:
cpu: 700m
memory: 1.8Gi
requests:
cpu: 500m
memory: 1.7Gi
---
apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: api
spec:
ports:
- port: 8083
protocol: TCP
targetPort: mysvcport
selector:
app: my-service-service-deployment
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: my-service-ingress
namespace: api
spec:
gateways:
- http-gateway
hosts:
- my-service.example.com
http:
- route:
- destination:
host: my-service
port:
number: 8083
---
apiVersion: v1
items:
- apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
clusterName: ""
creationTimestamp: 2018-11-07T13:17:00Z
name: http-gateway
namespace: api
resourceVersion: "11778445"
selfLink: /apis/networking.istio.io/v1alpha3/namespaces/api/gateways/http-gateway
uid: 694f66a4-e28f-11e8-bc21-0ac9e31187a0
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*.example.com'
port:
name: http
number: 80
protocol: HTTP
- hosts:
- '*.example.com'
port:
name: tomcat-http
number: 8083
protocol: HTTP
kind: List
metadata:
resourceVersion: ""
selfLink: ""
kubernetes istio
add a comment |
up vote
0
down vote
favorite
Hey so I configured gateway for port 80 and 8083 for same domain i-e example.com
. Now when I create attributes using below config file everything get up and running.
issue is I am using 8083
in service and virtualService but I get response from service at 80
where on 8083
getting connection timeout.
Unable to understand why service is responding on 80 not 8083. I want to keep both ports in gateway but when define in service and ingress port 8083 it should response on specifically on 8083.
Would appreciate your feedback in this.
apiVersion: v1
data:
my.databag.1: need_triage
kind: ConfigMap
metadata:
name: my-service-env-variables
namespace: api
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: my-service
name: my-service-service-deployment
namespace: api
spec:
replicas: 1
template:
metadata:
annotations:
traffic.sidecar.istio.io/excludeOutboundIPRanges: 0.0.0.0/0
labels:
app: my-service-service-deployment
spec:
containers:
- env:
- name: my.variable
valueFrom:
secretKeyRef:
key: my_token
name: my.variable
envFrom:
- configMapRef:
name: my-service-env-variables
image: imaagepath:tag
name: my-service-pod
ports:
- containerPort: 8080
name: mysvcport
resources:
limits:
cpu: 700m
memory: 1.8Gi
requests:
cpu: 500m
memory: 1.7Gi
---
apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: api
spec:
ports:
- port: 8083
protocol: TCP
targetPort: mysvcport
selector:
app: my-service-service-deployment
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: my-service-ingress
namespace: api
spec:
gateways:
- http-gateway
hosts:
- my-service.example.com
http:
- route:
- destination:
host: my-service
port:
number: 8083
---
apiVersion: v1
items:
- apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
clusterName: ""
creationTimestamp: 2018-11-07T13:17:00Z
name: http-gateway
namespace: api
resourceVersion: "11778445"
selfLink: /apis/networking.istio.io/v1alpha3/namespaces/api/gateways/http-gateway
uid: 694f66a4-e28f-11e8-bc21-0ac9e31187a0
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*.example.com'
port:
name: http
number: 80
protocol: HTTP
- hosts:
- '*.example.com'
port:
name: tomcat-http
number: 8083
protocol: HTTP
kind: List
metadata:
resourceVersion: ""
selfLink: ""
kubernetes istio
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Hey so I configured gateway for port 80 and 8083 for same domain i-e example.com
. Now when I create attributes using below config file everything get up and running.
issue is I am using 8083
in service and virtualService but I get response from service at 80
where on 8083
getting connection timeout.
Unable to understand why service is responding on 80 not 8083. I want to keep both ports in gateway but when define in service and ingress port 8083 it should response on specifically on 8083.
Would appreciate your feedback in this.
apiVersion: v1
data:
my.databag.1: need_triage
kind: ConfigMap
metadata:
name: my-service-env-variables
namespace: api
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: my-service
name: my-service-service-deployment
namespace: api
spec:
replicas: 1
template:
metadata:
annotations:
traffic.sidecar.istio.io/excludeOutboundIPRanges: 0.0.0.0/0
labels:
app: my-service-service-deployment
spec:
containers:
- env:
- name: my.variable
valueFrom:
secretKeyRef:
key: my_token
name: my.variable
envFrom:
- configMapRef:
name: my-service-env-variables
image: imaagepath:tag
name: my-service-pod
ports:
- containerPort: 8080
name: mysvcport
resources:
limits:
cpu: 700m
memory: 1.8Gi
requests:
cpu: 500m
memory: 1.7Gi
---
apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: api
spec:
ports:
- port: 8083
protocol: TCP
targetPort: mysvcport
selector:
app: my-service-service-deployment
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: my-service-ingress
namespace: api
spec:
gateways:
- http-gateway
hosts:
- my-service.example.com
http:
- route:
- destination:
host: my-service
port:
number: 8083
---
apiVersion: v1
items:
- apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
clusterName: ""
creationTimestamp: 2018-11-07T13:17:00Z
name: http-gateway
namespace: api
resourceVersion: "11778445"
selfLink: /apis/networking.istio.io/v1alpha3/namespaces/api/gateways/http-gateway
uid: 694f66a4-e28f-11e8-bc21-0ac9e31187a0
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*.example.com'
port:
name: http
number: 80
protocol: HTTP
- hosts:
- '*.example.com'
port:
name: tomcat-http
number: 8083
protocol: HTTP
kind: List
metadata:
resourceVersion: ""
selfLink: ""
kubernetes istio
Hey so I configured gateway for port 80 and 8083 for same domain i-e example.com
. Now when I create attributes using below config file everything get up and running.
issue is I am using 8083
in service and virtualService but I get response from service at 80
where on 8083
getting connection timeout.
Unable to understand why service is responding on 80 not 8083. I want to keep both ports in gateway but when define in service and ingress port 8083 it should response on specifically on 8083.
Would appreciate your feedback in this.
apiVersion: v1
data:
my.databag.1: need_triage
kind: ConfigMap
metadata:
name: my-service-env-variables
namespace: api
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: my-service
name: my-service-service-deployment
namespace: api
spec:
replicas: 1
template:
metadata:
annotations:
traffic.sidecar.istio.io/excludeOutboundIPRanges: 0.0.0.0/0
labels:
app: my-service-service-deployment
spec:
containers:
- env:
- name: my.variable
valueFrom:
secretKeyRef:
key: my_token
name: my.variable
envFrom:
- configMapRef:
name: my-service-env-variables
image: imaagepath:tag
name: my-service-pod
ports:
- containerPort: 8080
name: mysvcport
resources:
limits:
cpu: 700m
memory: 1.8Gi
requests:
cpu: 500m
memory: 1.7Gi
---
apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: api
spec:
ports:
- port: 8083
protocol: TCP
targetPort: mysvcport
selector:
app: my-service-service-deployment
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: my-service-ingress
namespace: api
spec:
gateways:
- http-gateway
hosts:
- my-service.example.com
http:
- route:
- destination:
host: my-service
port:
number: 8083
---
apiVersion: v1
items:
- apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
clusterName: ""
creationTimestamp: 2018-11-07T13:17:00Z
name: http-gateway
namespace: api
resourceVersion: "11778445"
selfLink: /apis/networking.istio.io/v1alpha3/namespaces/api/gateways/http-gateway
uid: 694f66a4-e28f-11e8-bc21-0ac9e31187a0
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*.example.com'
port:
name: http
number: 80
protocol: HTTP
- hosts:
- '*.example.com'
port:
name: tomcat-http
number: 8083
protocol: HTTP
kind: List
metadata:
resourceVersion: ""
selfLink: ""
kubernetes istio
kubernetes istio
asked Nov 8 at 10:49
Ahsan Naseem
446215
446215
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
Two issues with your configuration:
- You have to call your port
http-tomcat
and nottomcat-http
, see Istio requirements for named ports
- In order to enable ingress on port 8083, you have to redeploy the
istio-ingressgateway
service, with the port 8083 added:
helm template install/kubernetes/helm/istio/ --name istio-ingressgateway
--namespace istio-system -x charts/gateways/templates/service.yaml
--set gateways.istio-egressgateway.enabled=false
--set gateways.istio-ingressgateway.ports[0].port=80
--set gateways.istio-ingressgateway.ports[0].name=http
--set gateways.istio-ingressgateway.ports[1].port=443
--set gateways.istio-ingressgateway.ports[1].name=https
--set gateways.istio-ingressgateway.ports[2].port=8083
--set gateways.istio-ingressgateway.ports[2].name=http-tomcat
| kubectl apply -f -
Having said that, do you really have to enable ingress access to the port 8083? You can define some path in the VirtualService
for the port 80, e.g. /tomcat/* and direct the incoming traffic from the port 80 to your service on the port 8083.
Hey thanks for response and apologies for getting it back this late. so rather creatingistio-ingressgateway
service from scratch I edited service usingkubectl edit
Now this is how istio-gateway service looks like - name: http-tomcat nodePort: 30541 port: 8083 protocol: TCP targetPort: 8083 Also updated gateway of specific namespace ashttp-tomcat
with port 8084 but still same issue service is responding on port 80 but not on 8083
– Ahsan Naseem
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Two issues with your configuration:
- You have to call your port
http-tomcat
and nottomcat-http
, see Istio requirements for named ports
- In order to enable ingress on port 8083, you have to redeploy the
istio-ingressgateway
service, with the port 8083 added:
helm template install/kubernetes/helm/istio/ --name istio-ingressgateway
--namespace istio-system -x charts/gateways/templates/service.yaml
--set gateways.istio-egressgateway.enabled=false
--set gateways.istio-ingressgateway.ports[0].port=80
--set gateways.istio-ingressgateway.ports[0].name=http
--set gateways.istio-ingressgateway.ports[1].port=443
--set gateways.istio-ingressgateway.ports[1].name=https
--set gateways.istio-ingressgateway.ports[2].port=8083
--set gateways.istio-ingressgateway.ports[2].name=http-tomcat
| kubectl apply -f -
Having said that, do you really have to enable ingress access to the port 8083? You can define some path in the VirtualService
for the port 80, e.g. /tomcat/* and direct the incoming traffic from the port 80 to your service on the port 8083.
Hey thanks for response and apologies for getting it back this late. so rather creatingistio-ingressgateway
service from scratch I edited service usingkubectl edit
Now this is how istio-gateway service looks like - name: http-tomcat nodePort: 30541 port: 8083 protocol: TCP targetPort: 8083 Also updated gateway of specific namespace ashttp-tomcat
with port 8084 but still same issue service is responding on port 80 but not on 8083
– Ahsan Naseem
2 days ago
add a comment |
up vote
2
down vote
Two issues with your configuration:
- You have to call your port
http-tomcat
and nottomcat-http
, see Istio requirements for named ports
- In order to enable ingress on port 8083, you have to redeploy the
istio-ingressgateway
service, with the port 8083 added:
helm template install/kubernetes/helm/istio/ --name istio-ingressgateway
--namespace istio-system -x charts/gateways/templates/service.yaml
--set gateways.istio-egressgateway.enabled=false
--set gateways.istio-ingressgateway.ports[0].port=80
--set gateways.istio-ingressgateway.ports[0].name=http
--set gateways.istio-ingressgateway.ports[1].port=443
--set gateways.istio-ingressgateway.ports[1].name=https
--set gateways.istio-ingressgateway.ports[2].port=8083
--set gateways.istio-ingressgateway.ports[2].name=http-tomcat
| kubectl apply -f -
Having said that, do you really have to enable ingress access to the port 8083? You can define some path in the VirtualService
for the port 80, e.g. /tomcat/* and direct the incoming traffic from the port 80 to your service on the port 8083.
Hey thanks for response and apologies for getting it back this late. so rather creatingistio-ingressgateway
service from scratch I edited service usingkubectl edit
Now this is how istio-gateway service looks like - name: http-tomcat nodePort: 30541 port: 8083 protocol: TCP targetPort: 8083 Also updated gateway of specific namespace ashttp-tomcat
with port 8084 but still same issue service is responding on port 80 but not on 8083
– Ahsan Naseem
2 days ago
add a comment |
up vote
2
down vote
up vote
2
down vote
Two issues with your configuration:
- You have to call your port
http-tomcat
and nottomcat-http
, see Istio requirements for named ports
- In order to enable ingress on port 8083, you have to redeploy the
istio-ingressgateway
service, with the port 8083 added:
helm template install/kubernetes/helm/istio/ --name istio-ingressgateway
--namespace istio-system -x charts/gateways/templates/service.yaml
--set gateways.istio-egressgateway.enabled=false
--set gateways.istio-ingressgateway.ports[0].port=80
--set gateways.istio-ingressgateway.ports[0].name=http
--set gateways.istio-ingressgateway.ports[1].port=443
--set gateways.istio-ingressgateway.ports[1].name=https
--set gateways.istio-ingressgateway.ports[2].port=8083
--set gateways.istio-ingressgateway.ports[2].name=http-tomcat
| kubectl apply -f -
Having said that, do you really have to enable ingress access to the port 8083? You can define some path in the VirtualService
for the port 80, e.g. /tomcat/* and direct the incoming traffic from the port 80 to your service on the port 8083.
Two issues with your configuration:
- You have to call your port
http-tomcat
and nottomcat-http
, see Istio requirements for named ports
- In order to enable ingress on port 8083, you have to redeploy the
istio-ingressgateway
service, with the port 8083 added:
helm template install/kubernetes/helm/istio/ --name istio-ingressgateway
--namespace istio-system -x charts/gateways/templates/service.yaml
--set gateways.istio-egressgateway.enabled=false
--set gateways.istio-ingressgateway.ports[0].port=80
--set gateways.istio-ingressgateway.ports[0].name=http
--set gateways.istio-ingressgateway.ports[1].port=443
--set gateways.istio-ingressgateway.ports[1].name=https
--set gateways.istio-ingressgateway.ports[2].port=8083
--set gateways.istio-ingressgateway.ports[2].name=http-tomcat
| kubectl apply -f -
Having said that, do you really have to enable ingress access to the port 8083? You can define some path in the VirtualService
for the port 80, e.g. /tomcat/* and direct the incoming traffic from the port 80 to your service on the port 8083.
answered Nov 8 at 14:15
Vadim Eisenberg
1,609188
1,609188
Hey thanks for response and apologies for getting it back this late. so rather creatingistio-ingressgateway
service from scratch I edited service usingkubectl edit
Now this is how istio-gateway service looks like - name: http-tomcat nodePort: 30541 port: 8083 protocol: TCP targetPort: 8083 Also updated gateway of specific namespace ashttp-tomcat
with port 8084 but still same issue service is responding on port 80 but not on 8083
– Ahsan Naseem
2 days ago
add a comment |
Hey thanks for response and apologies for getting it back this late. so rather creatingistio-ingressgateway
service from scratch I edited service usingkubectl edit
Now this is how istio-gateway service looks like - name: http-tomcat nodePort: 30541 port: 8083 protocol: TCP targetPort: 8083 Also updated gateway of specific namespace ashttp-tomcat
with port 8084 but still same issue service is responding on port 80 but not on 8083
– Ahsan Naseem
2 days ago
Hey thanks for response and apologies for getting it back this late. so rather creating
istio-ingressgateway
service from scratch I edited service using kubectl edit
Now this is how istio-gateway service looks like - name: http-tomcat nodePort: 30541 port: 8083 protocol: TCP targetPort: 8083 Also updated gateway of specific namespace as http-tomcat
with port 8084 but still same issue service is responding on port 80 but not on 8083– Ahsan Naseem
2 days ago
Hey thanks for response and apologies for getting it back this late. so rather creating
istio-ingressgateway
service from scratch I edited service using kubectl edit
Now this is how istio-gateway service looks like - name: http-tomcat nodePort: 30541 port: 8083 protocol: TCP targetPort: 8083 Also updated gateway of specific namespace as http-tomcat
with port 8084 but still same issue service is responding on port 80 but not on 8083– Ahsan Naseem
2 days ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53206158%2fistio-gateway-with-multiple-ports-service-is-responding-only-on-port-80%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown