<p>In kubernetes, master node provide kube-apiserver process to accept REST API requests. What about ICp? can we use curl command to quickly test k8s REST APIs on ICp master node as well?</p>

<p>The answer is yes. But first you may need to pay attention to the default port for --insecure-port and --secure-port. By default, if you didn't change it in config.yaml file, ICp use below ports to accept REST requests:</p>

<p>--insecure-port=8888</p>

<p>--secure-port=8001</p>

<pre><code>netstat -anp|grep 8888
</code></pre>

<p>or </p>

<pre><code>netstat -anp|grep 8001
</code></pre>

<p>Or you can</p>

<pre><code>ps -ef|grep apiserver
</code></pre>

<p>result something like:</p>

<pre><code>root      5462  5442  9 Jan29 ?        22:48:09 /hyperkube apiserver
--secure-port=8001 --bind-address=0.0.0.0 --advertise-address=10.0.14.94 --insecure-port=8888 --insecure-bind-address=127.0.0.1 ......
</code></pre>

<p>Once you find the port, on master node, you can issue the curl quickly, first try via a insecure port:</p>

<pre><code>curl http://localhost:8888/api
</code></pre>

<p>result something like:</p>

<pre><code>{
  "kind": "APIVersions",
  "versions": [
    "v1"
  ],
  "serverAddressByClientCIDRs": [
    {
      "clientCIDR": "0.0.0.0/0",
      "serverAddress": "10.0.14.94:8001"
    }
  ]
}
</code></pre>

<p>further call to /api/v1 and /api/v1/pods, /api/v1/services are as you like.</p>

<p>But you cannot do the same on other node. On other node, you may have to use secure port, but with a <strong>-k</strong> parameter to ignore the certificate:</p>

<p>on client or other node:</p>

<pre><code>curl -k https://10.0.14.94:8001/api
</code></pre>

<p>result should be the same unless you specify the ca certificate.</p>
