kubernetes에서 proxy 사용 예시이다



$ kubectl proxy --api-prefix=/ &

[1] 9789

Starting to serve on 127.0.0.1:8001





$ curl http://127.0.0.1:8001/api/

{

  "kind": "APIVersions",

  "versions": [

    "v1"

  ],

  "serverAddressByClientCIDRs": [

    {

      "clientCIDR": "0.0.0.0/0",

      "serverAddress": "10.1.1.1:6443"

    }

  ]






$ curl http://127.0.0.1:8001/api/v1/namespaces
{
"kind": "NamespaceList",
"apiVersion": "v1",
"metadata": {
"selfLink": "/api/v1/namespaces",
"resourceVersion": "445783"
"items": [
    {
      "metadata": {
        "name": "default",
        "selfLink": "/api/v1/namespaces/default",
        "uid": "8fd4381e-f15f-11e8-8c69-fa163ec1822d",
        "resourceVersion": "5",
        "creationTimestamp": ",.,,,17Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    },
    {
      "metadata": {
        "name": "ingres

...

Posted by '김용환'
,