Open murphye opened 3 years ago
If all the svclb
is supposed to do is IP Tables routing, why this is happening is beyond me...
More info for you:
k get svc -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
istiod ClusterIP 10.43.25.101 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 93m
istiod-1-8-3 ClusterIP 10.43.233.100 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 92m
istio-ingressgateway LoadBalancer 10.43.152.110 172.26.0.2 15021:30331/TCP,80:30864/TCP,443:31938/TCP,15012:30935/TCP,15443:30695/TCP 91m
k get svc -n istio-system istio-ingressgateway -o yaml
apiVersion: v1
kind: Service
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"istio-ingressgateway","install.operator.istio.io/owning-resource":"istio-ingress-gw-install","install.operator.istio.io/owning-resource-namespace":"istio-system","istio":"ingressgateway","istio.io/rev":"1-8-3","operator.istio.io/component":"IngressGateways","operator.istio.io/managed":"Reconcile","operator.istio.io/version":"1.8.3","release":"istio"},"name":"istio-ingressgateway","namespace":"istio-system"},"spec":{"ports":[{"name":"status-port","port":15021,"protocol":"TCP","targetPort":15021},{"name":"http2","port":80,"protocol":"TCP","targetPort":8080},{"name":"https","port":443,"protocol":"TCP","targetPort":8443},{"name":"tcp-istiod","port":15012,"protocol":"TCP","targetPort":15012},{"name":"tls","port":15443,"protocol":"TCP","targetPort":15443}],"selector":{"app":"istio-ingressgateway","istio":"ingressgateway"},"type":"LoadBalancer"}}
creationTimestamp: "2021-03-09T20:53:37Z"
labels:
app: istio-ingressgateway
install.operator.istio.io/owning-resource: istio-ingress-gw-install
install.operator.istio.io/owning-resource-namespace: istio-system
istio: ingressgateway
istio.io/rev: 1-8-3
operator.istio.io/component: IngressGateways
operator.istio.io/managed: Reconcile
operator.istio.io/version: 1.8.3
release: istio
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:kubectl.kubernetes.io/last-applied-configuration: {}
f:labels:
.: {}
f:app: {}
f:install.operator.istio.io/owning-resource: {}
f:install.operator.istio.io/owning-resource-namespace: {}
f:istio: {}
f:istio.io/rev: {}
f:operator.istio.io/component: {}
f:operator.istio.io/managed: {}
f:operator.istio.io/version: {}
f:release: {}
f:spec:
f:externalTrafficPolicy: {}
f:ports:
.: {}
k:{"port":80,"protocol":"TCP"}:
.: {}
f:name: {}
f:port: {}
f:protocol: {}
f:targetPort: {}
k:{"port":443,"protocol":"TCP"}:
.: {}
f:name: {}
f:port: {}
f:protocol: {}
f:targetPort: {}
k:{"port":15012,"protocol":"TCP"}:
.: {}
f:name: {}
f:port: {}
f:protocol: {}
f:targetPort: {}
k:{"port":15021,"protocol":"TCP"}:
.: {}
f:name: {}
f:port: {}
f:protocol: {}
f:targetPort: {}
k:{"port":15443,"protocol":"TCP"}:
.: {}
f:name: {}
f:port: {}
f:protocol: {}
f:targetPort: {}
f:selector:
.: {}
f:app: {}
f:istio: {}
f:sessionAffinity: {}
f:type: {}
manager: istioctl
operation: Update
time: "2021-03-09T20:53:37Z"
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:status:
f:loadBalancer:
f:ingress: {}
manager: k3s
operation: Update
time: "2021-03-09T20:53:51Z"
name: istio-ingressgateway
namespace: istio-system
resourceVersion: "1223"
uid: e9ad5ede-1316-4c08-af24-1d8f488bac54
spec:
clusterIP: 10.43.152.110
clusterIPs:
- 10.43.152.110
externalTrafficPolicy: Cluster
ports:
- name: status-port
nodePort: 30331
port: 15021
protocol: TCP
targetPort: 15021
- name: http2
nodePort: 30864
port: 80
protocol: TCP
targetPort: 8080
- name: https
nodePort: 31938
port: 443
protocol: TCP
targetPort: 8443
- name: tcp-istiod
nodePort: 30935
port: 15012
protocol: TCP
targetPort: 15012
- name: tls
nodePort: 30695
port: 15443
protocol: TCP
targetPort: 15443
selector:
app: istio-ingressgateway
istio: ingressgateway
sessionAffinity: None
type: LoadBalancer
status:
loadBalancer:
ingress:
- ip: 172.26.0.2
@murphye
k port-forward istio-ingressgateway-5686db779c-z2hk7 7443:43 -n istio-system
You port-forward port's 43 port to localhost 7443 port and certificate works well. While in pod yaml there is no 43 container port declared:
- containerPort: 15021
protocol: TCP
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
- containerPort: 15012
protocol: TCP
- containerPort: 15443
protocol: TCP
- containerPort: 15090
name: http-envoy-prom
protocol: TCP
istio-ingressgateway service declared 443 to pod's 8443, so your pod ports and make it sync with those of service.
@murphye , did you figure why this happened? I am facing the same issue, standard Istio install with minimal
profile via IstioOperator
.
@juniorz No. I have not tried this in a long time. You may want to try MetalLB.
I am using k3d v4.2.0, but have narrowed down to this being a Klipper svclb issue. I am using the Istio proxy service, and port 80 is working fine. However when I enable SSL/TLS for routing to 443, I cannot connect properly because the SSL certificate is not being returned to the client.
I am starting my k3d cluster with this command:
k3d cluster create --registry-create --k3s-server-arg '--no-deploy=traefik' -p "9080:80@loadbalancer" -p "9443:43@loadbalancer" istio-workshop
If I connect to the
istio-ingressgateway
directly, it's fine. If I connect tosvclb-istio-ingressgateway
that is where the problem begins.Connecting to
svclb-istio-ingressgateway
withopenssl
. No certificate returned. Error.Connecting to
istio-ingressgateway
withopenssl
. Certificate returned. Correct.Logs from
svclb-istio-ingressgateway
.svclb-istio-ingressgateway
pod spec.istio-ingressgateway
pod spec.