Description of problem: When try to access the frontend service via api proxy for examples/sample-app/application-template-stibuild.json template, got 503 # curl -k -H "Authorization:Bearer rKcVgAatuoZxrLKPFuiirTY23ExDFMOeyBvne_GE1y0" https://127.0.0.1:8443/api/v1/proxy/namespaces/default/services/http:frontend:5432-tcp/ { "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Failure", "message": "no endpoints available for service \"http:frontend:5432-tcp\"", "reason": "ServiceUnavailable", "code": 503 } # curl -k -H "Authorization:Bearer rKcVgAatuoZxrLKPFuiirTY23ExDFMOeyBvne_GE1y0" https://127.0.0.1:8443/api/v1/proxy/namespaces/default/services/ https:frontend:5432-tcp/ { "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Failure", "message": "no endpoints available for service \"https:frontend:5432-tcp\"", "reason": "ServiceUnavailable", "code": 503 } Version-Release number of selected component (if applicable): fork_ami_openshift3_platformmanagement_public_522_98 How reproducible: always Steps to Reproduce: 1.Create a template app with examples/sample-app/application-template-stibuild.json in default namespaces 2.Use cluster-admin access the the pod via API proxy curl -k -H "Authorization:Bearer rKcVgAatuoZxrLKPFuiirTY23ExDFMOeyBvne_GE1y0" https://127.0.0.1:8443/api/v1/proxy/namespaces/default/services/http:frontend:5432-tcp/ 3. Actual results: As description Expected results: Should not got 503, should be 200. Additional info: Work fine with pod via api proxy
Proxying to a service port requires the name of the port. `new-app` happens to generate names with `<port>-<protocol>`, but the sti template sets its own custom names. I think you need to use "https://127.0.0.1:8443/api/v1/proxy/namespaces/default/services/http:frontend:web/" Also, https will only work if the backend is actually serving https, which I don't think the sample app is.
(In reply to Jordan Liggitt from comment #1) > Proxying to a service port requires the name of the port. `new-app` happens > to generate names with `<port>-<protocol>`, but the sti template sets its > own custom names. > > I think you need to use > "https://127.0.0.1:8443/api/v1/proxy/namespaces/default/services/http: > frontend:web/" > > Also, https will only work if the backend is actually serving https, which I > don't think the sample app is. Rechecked with /http:frontend:web/ and found this is not an issue now.