# Retrieve Node Configuration for Clusters Created Using Hostname

## Problem

Retrieve Node Configuration for Clusters Created Hostname.

## Environment

* Platform9 Managed Kubernetes - v5.2 & K8s v1.20 and Higher

## Answer

Single Node Cluster created with *hostname:true.*

{% tabs %}
{% tab title="None" %}

```none
$ kubectl get nodes
NAME                    STATUS   ROLES    AGE     VERSION
sanchit-mav.novalocal   Ready    master   5m37s   v1.20.5
```

{% endtab %}
{% endtabs %}

Starting Kubectl Proxy on the node.

{% tabs %}
{% tab title="None" %}

```none
$ kubectl proxy --port=8001 &
[1] 12428

$ Starting to serve on 127.0.0.1:8001
```

{% endtab %}
{% endtabs %}

With hostname of the node in curl call.

{% tabs %}
{% tab title="None" %}

```none
$ curl -sSL http://localhost:8001/api/v1/nodes/sanchit-mav.novalocal/proxy/configz -vvv
* About to connect() to localhost port 8001 (#0)
*   Trying ::1...
* Connection refused
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8001 (#0)
> GET /api/v1/nodes/sanchit-mav.novalocal/proxy/configz HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:8001
> Accept: */*
>
< HTTP/1.1 200 OK
< Cache-Control: no-cache, private
< Content-Length: 2431
< Content-Type: application/json
< Date: Wed, 22 Sep 2021 23:34:51 GMT
< X-Content-Type-Options: nosniff
<
{"kubeletconfig":{"enableServer":true,"staticPodPath":"/etc/pf9/kube.d/master.yaml","syncFrequency":"1m0s","fileCheckFrequency":"20s","httpCheckFrequency":"20s","address":"0.0.0.0","port":10250,"tlsCertFile":"/etc/pf9/kube.d/certs/kubelet/server/request.crt","tlsPrivateKeyFile":"/etc/pf9/kube.d/certs/kubelet/server/request.key","tlsCipherSuites":["TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"],"authentication":{"x509":{"clientCAFile":"/etc/pf9/kube.d/certs/kubelet/server/ca.crt"},"webhook":{"enabled":true,"cacheTTL":"2m0s"},"anonymous":{"enabled":false}},"authorization":{"mode":"AlwaysAllow","webhook":{"cacheAuthorizedTTL":"5m0s","cacheUnauthorizedTTL":"30s"}},"registryPullQPS":5,"registryBurst":10,"eventRecordQPS":5,"eventBurst":10,"enableDebuggingHandlers":true,"healthzPort":10248,"healthzBindAddress":"127.0.0.1","oomScoreAdj":-999,"clusterDomain":"cluster.local","clusterDNS":["10.21.0.10"],"streamingConnectionIdleTimeout":"4h0m0s","nodeStatusUpdateFrequency":"10s","nodeStatusReportFrequency":"5m0s","nodeLeaseDurationSeconds":40,"imageMinimumGCAge":"2m0s","imageGCHighThresholdPercent":85,"imageGCLowThresholdPercent":80,"volumeStatsAggPeriod":"1m0s","cgroupsPerQOS":true,"cgroupDriver":"cgroupfs","cpuManagerPolicy":"none","cpuManagerReconcilePeriod":"10s","topologyManagerPolicy":"none","topologyManagerScope":"container","runtimeRequestTimeout":"2m0s","hairpinMode":"promiscuous-bridge","maxPods":200,"podPidsLimit":-1,"resolvConf":"/etc/resolv.conf","cpuCFSQuota":true,"cpuCFSQuotaPeriod":"100ms","nodeStatusMaxImages":50,"maxOpenFiles":1000000,"contentType":"application/vnd.kubernetes.protobuf","kubeAPIQPS":5,"kubeAPIBurst":10,"serializeImagePulls":true,"evictionHard":{"imagefs.available":"15%","memory.available":"100Mi","nodefs.available":"10%","nodefs.inodesFree":"5%"},"evictionPressureTransitionPeriod":"5m0s","enableControllerAttachDetach":true,"makeIPTablesUtilChains":true,"iptablesMasqueradeBit":14,"iptablesDropBit":15,"featureGates":{"D* Connection #0 to host localhost left intact
ynamicKubeletConfig":true},"failSwapOn":true,"containerLogMaxSize":"10Mi","containerLogMaxFiles":5,"configMapAndSecretChangeDetectionStrategy":"Watch","enforceNodeAllocatable":["pods"],"volumePluginDir":"/usr/libexec/kubernetes/kubelet-plugins/volume/exec/","logging":{"format":"text"},"enableSystemLogHandler":true,"shutdownGracePeriod":"0s","shutdownGracePeriodCriticalPods":"0s"}}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmk/frequently-asked-questions/retrieve-node-configuration-for-clusters-created-using-hostname.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
