# kubernetes/kubelet architecture

> Architecture diagram of the GitHub repository kubernetes/kubelet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kubernetes/kubelet
- Repository: https://github.com/kubernetes/kubelet

## Overview

This staged repository publishes Kubernetes kubelet API types and protocol contracts; it is not the kubelet runtime. Its documented user workflow is for third-party tools to author and vendor versioned ComponentConfig types. Separate API families define contracts for device plugins, DRA, plugin registration, pod resources, pods, and stats. The DRA version bridge and DRA-health adapters preserve compatibility between API versions. Source sampling is limited, so links between unsampled contracts and external callers are omitted rather than inferred.

Main entry points: [`pkg/apis/dra/v1beta1`](https://github.com/kubernetes/kubelet/tree/master/pkg/apis/dra/v1beta1) (DRA version bridge), [`pkg/apis/dra-health/v1/conversion.go`](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra-health/v1/conversion.go) (Health version adapter), [`config/v1/types.go`](https://github.com/kubernetes/kubelet/blob/master/config/v1/types.go) (Config v1), [`config/v1alpha1/types.go`](https://github.com/kubernetes/kubelet/blob/master/config/v1alpha1/types.go) (Config v1alpha1)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_config["ComponentConfig"]
  node_configv1["Config v1<br/>[types.go]"]
  node_configalpha["Config v1alpha1<br/>[types.go]"]
  node_configbeta["Config v1beta1<br/>[types.go]"]
end

subgraph group_resource["Resource APIs"]
  node_dra1["DRA v1<br/>[types.go]"]
  node_drabeta["DRA v1beta1<br/>[types.go]"]
  node_drabridge["DRA version bridge"]
  node_health1["DRA health v1<br/>[types.go]"]
  node_healthalpha["DRA health v1alpha1<br/>[types.go]"]
  node_healthbridge["Health version adapter<br/>[conversion.go]"]
end

subgraph group_plugin["Plugin Protocols"]
  node_devicealpha["Device plugin v1alpha<br/>[api.proto]"]
  node_devicebeta["Device plugin v1beta1<br/>[api.proto]"]
  node_registration1["Plugin registration v1<br/>[api.proto]"]
  node_registrationalpha["Registration v1alpha1<br/>[api.proto]"]
  node_registrationbeta["Registration v1beta1<br/>[api.proto]"]
  node_podresources1["Pod resources v1<br/>[api.proto]"]
  node_podresourcesalpha["Pod resources v1alpha1<br/>[api.proto]"]
  node_podsalpha["Pods v1alpha1<br/>[api.proto]"]
  node_statsalpha["Stats v1alpha1<br/>[types.go]"]
end

subgraph group_shared["Shared Types"]
  node_labels["Pod label helpers<br/>[labels.go]"]
  node_wellknown["Kubelet label rules"]
end

node_tool(("Third-party tools"))

node_tool -->|"authors and vendors"| node_configv1
node_tool -->|"authors and vendors"| node_configalpha
node_tool -->|"authors and vendors"| node_configbeta
node_drabridge -->|"converts versions"| node_dra1
node_drabridge -->|"converts versions"| node_drabeta
node_healthbridge -->|"adapts service"| node_health1
node_healthbridge -->|"converts messages"| node_healthalpha

click node_configv1 "https://github.com/kubernetes/kubelet/blob/master/config/v1/types.go"
click node_configalpha "https://github.com/kubernetes/kubelet/blob/master/config/v1alpha1/types.go"
click node_configbeta "https://github.com/kubernetes/kubelet/blob/master/config/v1beta1/types.go"
click node_dra1 "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra/v1/types.go"
click node_drabeta "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra/v1beta1/types.go"
click node_drabridge "https://github.com/kubernetes/kubelet/tree/master/pkg/apis/dra/v1beta1"
click node_health1 "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra-health/v1/types.go"
click node_healthalpha "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra-health/v1alpha1/types.go"
click node_healthbridge "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra-health/v1/conversion.go"
click node_devicealpha "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/deviceplugin/v1alpha/api.proto"
click node_devicebeta "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/deviceplugin/v1beta1/api.proto"
click node_registration1 "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/pluginregistration/v1/api.proto"
click node_registrationalpha "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/pluginregistration/v1alpha1/api.proto"
click node_registrationbeta "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/pluginregistration/v1beta1/api.proto"
click node_podresources1 "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/podresources/v1/api.proto"
click node_podresourcesalpha "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/podresources/v1alpha1/api.proto"
click node_podsalpha "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/pods/v1alpha1/api.proto"
click node_statsalpha "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/stats/v1alpha1/types.go"
click node_labels "https://github.com/kubernetes/kubelet/blob/master/pkg/types/labels.go"
click node_wellknown "https://github.com/kubernetes/kubelet/blob/master/pkg/apis/well_known_labels.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_configv1,node_configalpha,node_configbeta toneBlue
class node_dra1,node_drabeta,node_drabridge,node_health1,node_healthalpha,node_healthbridge toneAmber
class node_devicealpha,node_devicebeta,node_registration1,node_registrationalpha,node_registrationbeta,node_podresources1,node_podresourcesalpha,node_podsalpha,node_statsalpha toneMint
class node_labels,node_wellknown toneRose
class node_tool toneIndigo
```

## Components

### ComponentConfig

- [Config v1](https://github.com/kubernetes/kubelet/blob/master/config/v1/types.go): `config/v1/types.go`
- [Config v1alpha1](https://github.com/kubernetes/kubelet/blob/master/config/v1alpha1/types.go): `config/v1alpha1/types.go`
- [Config v1beta1](https://github.com/kubernetes/kubelet/blob/master/config/v1beta1/types.go): `config/v1beta1/types.go`

### Resource APIs

- [DRA v1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra/v1/types.go): `pkg/apis/dra/v1/types.go`
- [DRA v1beta1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra/v1beta1/types.go): `pkg/apis/dra/v1beta1/types.go`
- [DRA version bridge](https://github.com/kubernetes/kubelet/tree/master/pkg/apis/dra/v1beta1): `pkg/apis/dra/v1beta1`
- [DRA health v1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra-health/v1/types.go): `pkg/apis/dra-health/v1/types.go`
- [DRA health v1alpha1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra-health/v1alpha1/types.go): `pkg/apis/dra-health/v1alpha1/types.go`
- [Health version adapter](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/dra-health/v1/conversion.go): `pkg/apis/dra-health/v1/conversion.go`

### Plugin Protocols

- [Device plugin v1alpha](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/deviceplugin/v1alpha/api.proto): `pkg/apis/deviceplugin/v1alpha/api.proto`
- [Device plugin v1beta1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/deviceplugin/v1beta1/api.proto): `pkg/apis/deviceplugin/v1beta1/api.proto`
- [Plugin registration v1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/pluginregistration/v1/api.proto): `pkg/apis/pluginregistration/v1/api.proto`
- [Registration v1alpha1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/pluginregistration/v1alpha1/api.proto): `pkg/apis/pluginregistration/v1alpha1/api.proto`
- [Registration v1beta1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/pluginregistration/v1beta1/api.proto): `pkg/apis/pluginregistration/v1beta1/api.proto`
- [Pod resources v1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/podresources/v1/api.proto): `pkg/apis/podresources/v1/api.proto`
- [Pod resources v1alpha1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/podresources/v1alpha1/api.proto): `pkg/apis/podresources/v1alpha1/api.proto`
- [Pods v1alpha1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/pods/v1alpha1/api.proto): `pkg/apis/pods/v1alpha1/api.proto`
- [Stats v1alpha1](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/stats/v1alpha1/types.go): `pkg/apis/stats/v1alpha1/types.go`

### Shared Types

- [Pod label helpers](https://github.com/kubernetes/kubelet/blob/master/pkg/types/labels.go): `pkg/types/labels.go`
- [Kubelet label rules](https://github.com/kubernetes/kubelet/blob/master/pkg/apis/well_known_labels.go): `pkg/apis/well_known_labels.go`

### Other components

- **Third-party tools**

## Connections

- Third-party tools → Config v1: authors and vendors (evidence: `README.md`)
- Third-party tools → Config v1alpha1: authors and vendors (evidence: `README.md`)
- Third-party tools → Config v1beta1: authors and vendors (evidence: `README.md`)
- DRA version bridge → DRA v1: converts versions (evidence: `pkg/apis/dra/v1beta1/conversion.go`)
- DRA version bridge → DRA v1beta1: converts versions (evidence: `pkg/apis/dra/v1beta1/conversion.go`)
- Health version adapter → DRA health v1: adapts service (evidence: `pkg/apis/dra-health/v1/conversion.go`)
- Health version adapter → DRA health v1alpha1: converts messages (evidence: `pkg/apis/dra-health/v1/conversion.go`)
