Exploring Application Endpoints for the purposes of Debugging with OpenShift 4.x

Updated

To do this you need to have an open port that allows authentication to the component you’re gathering metrics from. To do this you can do the following:

  • Example:

    $ oc -n openshift-apiserver port-forward apiserver-9zm2n :8443
    Forwarding from 127.0.0.1:36659 -> 8443
    

After you have this port open you can run any or all of the following commands to collect critical data from the OpenShift component endpoints.

  1. List out all the endpoints

    • Note: You will need to use the port from the command above, so replace port correctly in the examples below.
    $ oc get --insecure-skip-tls-verify --server=https://localhost:<port> --raw=/
    
  2. Get the version of the components you are working with (from the endpoint).

    $ oc get --insecure-skip-tls-verify --server=https://localhost:<port> --raw=/version`
    
  3. Get the endpoints overall health/status.

    $ oc get --insecure-skip-tls-verify --server=https://localhost:<port> --raw=/healthz`
    
    • You will also want to ensure that you run oc get --insecure-skip-tls-verify --server=https://localhost:<port> --raw=/ and make specific requests to every endpoint under /healthz are pulled using this method, getting specific health informaiton for these sub-endpoints.
  4. Get the metrics details from the debugging endpoints.

    $ oc get --insecure-skip-tls-verify --server=https://localhost:<port> --raw=/metrics`
    
SBR
Category
Article Type