# Kubelet's API

Kubelet API | HTTP request | Description
--- | --- | ---
`/stats` |
    GET /stats

    GET /stats/summary

    GET /stats/summary?only_cpu_and_memory=true

    GET /stats/container

    GET /stats/{namespace}/{podName}/{uid}/{containerName}

    GET /stats/{podName}/{containerName}
| Return the performance stats of node, pods and containers
`/metrics` |
    GET /metrics

    GET /metrics/cadvisor

    GET /metrics/probes

    GET /metrics/resource/v1alpha1
| Return information about node CPU and memory usage
`/logs` |
    GET /logs

    GET /logs/{subpath}
| Logs from the node
`/spec` |
    GET /spec
| Cached MachineInfo returned by cadvisor
`/pods` |
    GET /pods
| List of pods
`/healthz` |
    GET /healthz

    GET /healthz/log

    GET /healthz/ping

    GET /healthz/syncloop
| Check the state of the node
`/configz` |
    GET /configz
| Kubelet's configurations
`/containerLogs` |
    GET /containerLogs/{podNamespace}/{podID}/{containerName}
| Container's logs
`/run` |
    POST /run/{podNamespace}/{podID}/{containerName}

    POST /run/{podNamespace}/{podID}/{uid}/{containerName}

    * The body of the request: "cmd={command}"

    Example: "cmd=ls /"
| Run command inside a container
`/exec` |
    GET  /exec/{podNamespace}/{podID}/{containerName}?command={command}/&input=1&output=1&tty=1

    POST /exec/{podNamespace}//{containerName}?command={command}/&input=1&output=1&tty=1

    GET  /exec/{podNamespace}/{podID}/{uid}/{containerName}?command={command}/&input=1&output=1&tty=1

    POST /exec/{podNamespace}/{podID}/{uid}/{containerName}?command={command}/&input=1&output=1&tty=1
| Run command inside a container with option for stream (interactive)
`/cri` |
    GET /cri/exec/{valueFrom302}?cmd={command}
| Run commands inside a container through the Container Runtime Interface (CRI)
`/attach` |
    GET  /attach/{podNamespace}/{podID}/{containerName}

    POST /attach/{podNamespace}//{containerName}

    GET  /attach/{podNamespace}/{podID}/{uid}/{containerName}

    POST /attach/{podNamespace}/{podID}/{uid}/{containerName}
| Attach to a container
`/portForward` |
    GET  /portForward/{podNamespace}/{podID}/{containerName}

    POST /portForward/{podNamespace}//{containerName}

    GET  /portForward/{podNamespace}/{podID}/{uid}/{containerName}

    POST /portForward/{podNamespace}/{podID}/{uid}/{containerName}
| Port forwarding inside the contianer
`/runningpods` |
    GET  /runningpods
| List all the running pods
`/debug` |
    GET  /debug/pprof/{profile}

    GET /debug/flags/v

    PUT /debug/flags/v (body: {integer})
| List all the running pods