How to run REST API call in Openshift v3

Solution Verified - Updated -

Issue

  • When running REST API call in Openshift below error is seen :
 curl https://master.example.com:8443/oapi/v1/pods -k
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"joe\" cannot list all pods in the cluster",
  "reason": "Forbidden",
  "details": {},
  "code": 403
  • When running below command an error is reported :
curl -k  https://master.example.com:8443/broker/rest/api
{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"system:anonymous\" cannot \"get\" on \"/broker/rest/api\"",
  "reason": "Forbidden",
  "details": {},
  "code": 403
  • What is the correct way to call REST API in Openshift v3.

Environment

  • Openshift Enterprise
    • 3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content