MENU
      View kubeconfig
        • PDF

        View kubeconfig

        • PDF

        Article summary

        Available in VPC

        View the kubeconfig configuration file for the cluster.

        Note
        • Clusters created on or after February 13, 2022 have IAM authentication automatically applied, so you can't view the kubeconfig configuration file through this API.
        • For clusters created before February 13, 2022, you can configure the kubeconfig configuration file with ncp-iam-authenticator to control cluster permissions by IAM service (Sub Account) account through IAM authentication

        Requests

        The following describes the request format for the endpoint. The request format is as follows.

        MethodURI
        GET/clusters/{uuid}/kubeconfig

        Request headers

        For headers common to all Ncloud Kubernetes Service APIs, see Ncloud Kubernetes Service common headers.

        Request path parameters

        The following describes the parameters.

        FieldTypeRequiredDescription
        uuidStringRequiredUUID of the cluster

        Request example

        The following is a sample request.

        curl --location 'https://nks.apigw.ntruss.com/vnks/v2/clusters/{uuid}/kubeconfig' \
        --header 'x-ncp-apigw-timestamp: {timestamp}' \
        --header 'x-ncp-iam-access-key: {access key}' \
        --header 'x-ncp-apigw-signature-v2: {API gateway signature}' \
        Curl

        Responses

        The following describes the response format.

        Response syntax

        The response syntax is as follows.

        {
          "kubeconfig": "string"
        }
        JSON

        Response body

        The following describes the response body.

        FieldTypeRequiredDescription
        kubeconfigString-JSON value of kubeconfig

        Response status codes

        For response status codes common to all Ncloud Kubernetes Service APIs, see Ncloud Kubernetes Service response status codes.

        Response example

        The following is a sample response.

        {
            "kubeconfig": "apiVersion: v1\nclusters:\n  - cluster:\n      certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM2VENDQWRHZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQ0FYRFRJME1ETXlPREEwTURnd01sb1lEekl4TWpRd016QTBNRFF3T0RBeVdqQVZNUk13RVFZRApWUVFERXdwcmRXSmxjbTVsZEdWek1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBCnBvNVJJRjZ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XpUNkxhaWxEdkVuanN1Yz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=\n      server: https://1a1111a1-4d44-99b9-88c8-9e99a99e9e99.kr.vnks.ntruss.com\n    name: kubernetes\ncontexts:\n  - context:\n      cluster: kubernetes\n      user: kubernetes-admin\n    name: kubernetes-admin@kubernetes\ncurrent-context: kubernetes-admin@kubernetes\nkind: Config\npreferences: {}\n"
        }
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.