380 lines
11 KiB
Markdown
380 lines
11 KiB
Markdown
---
|
|
title: Kubelet Configuration (v1)
|
|
content_type: tool-reference
|
|
package: kubelet.config.k8s.io/v1
|
|
auto_generated: true
|
|
---
|
|
|
|
|
|
## Resource Types
|
|
|
|
|
|
- [CredentialProviderConfig](#kubelet-config-k8s-io-v1-CredentialProviderConfig)
|
|
|
|
|
|
|
|
## `CredentialProviderConfig` {#kubelet-config-k8s-io-v1-CredentialProviderConfig}
|
|
|
|
|
|
|
|
<p>CredentialProviderConfig is the configuration containing information about
|
|
each exec credential provider. Kubelet reads this configuration from disk and enables
|
|
each provider as specified by the CredentialProvider type.</p>
|
|
|
|
|
|
<table class="table">
|
|
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
|
|
<tr><td><code>apiVersion</code><br/>string</td><td><code>kubelet.config.k8s.io/v1</code></td></tr>
|
|
<tr><td><code>kind</code><br/>string</td><td><code>CredentialProviderConfig</code></td></tr>
|
|
|
|
|
|
<tr><td><code>providers</code> <B>[Required]</B><br/>
|
|
<a href="#kubelet-config-k8s-io-v1-CredentialProvider"><code>[]CredentialProvider</code></a>
|
|
</td>
|
|
<td>
|
|
<p>providers is a list of credential provider plugins that will be enabled by the kubelet.
|
|
Multiple providers may match against a single image, in which case credentials
|
|
from all providers will be returned to the kubelet. If multiple providers are called
|
|
for a single image, the results are combined. If providers return overlapping
|
|
auth keys, the value from the provider earlier in this list is used.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
## `CredentialProvider` {#kubelet-config-k8s-io-v1-CredentialProvider}
|
|
|
|
|
|
**Appears in:**
|
|
|
|
- [CredentialProviderConfig](#kubelet-config-k8s-io-v1-CredentialProviderConfig)
|
|
|
|
|
|
<p>CredentialProvider represents an exec plugin to be invoked by the kubelet. The plugin is only
|
|
invoked when an image being pulled matches the images handled by the plugin (see matchImages).</p>
|
|
|
|
|
|
<table class="table">
|
|
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
|
|
|
|
<tr><td><code>name</code> <B>[Required]</B><br/>
|
|
<code>string</code>
|
|
</td>
|
|
<td>
|
|
<p>name is the required name of the credential provider. It must match the name of the
|
|
provider executable as seen by the kubelet. The executable must be in the kubelet's
|
|
bin directory (set by the --image-credential-provider-bin-dir flag).</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>matchImages</code> <B>[Required]</B><br/>
|
|
<code>[]string</code>
|
|
</td>
|
|
<td>
|
|
<p>matchImages is a required list of strings used to match against images in order to
|
|
determine if this provider should be invoked. If one of the strings matches the
|
|
requested image from the kubelet, the plugin will be invoked and given a chance
|
|
to provide credentials. Images are expected to contain the registry domain
|
|
and URL path.</p>
|
|
<p>Each entry in matchImages is a pattern which can optionally contain a port and a path.
|
|
Globs can be used in the domain, but not in the port or the path. Globs are supported
|
|
as subdomains like '<em>.k8s.io' or 'k8s.</em>.io', and top-level-domains such as 'k8s.<em>'.
|
|
Matching partial subdomains like 'app</em>.k8s.io' is also supported. Each glob can only match
|
|
a single subdomain segment, so *.io does not match *.k8s.io.</p>
|
|
<p>A match exists between an image and a matchImage when all of the below are true:</p>
|
|
<ul>
|
|
<li>Both contain the same number of domain parts and each part matches.</li>
|
|
<li>The URL path of an imageMatch must be a prefix of the target image URL path.</li>
|
|
<li>If the imageMatch contains a port, then the port must match in the image as well.</li>
|
|
</ul>
|
|
<p>Example values of matchImages:</p>
|
|
<ul>
|
|
<li>123456789.dkr.ecr.us-east-1.amazonaws.com</li>
|
|
<li>*.azurecr.io</li>
|
|
<li>gcr.io</li>
|
|
<li><em>.</em>.registry.io</li>
|
|
<li>registry.io:8080/path</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>defaultCacheDuration</code> <B>[Required]</B><br/>
|
|
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
|
|
</td>
|
|
<td>
|
|
<p>defaultCacheDuration is the default duration the plugin will cache credentials in-memory
|
|
if a cache duration is not provided in the plugin response. This field is required.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>apiVersion</code> <B>[Required]</B><br/>
|
|
<code>string</code>
|
|
</td>
|
|
<td>
|
|
<p>Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse
|
|
MUST use the same encoding version as the input. Current supported values are:</p>
|
|
<ul>
|
|
<li>credentialprovider.kubelet.k8s.io/v1</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>args</code><br/>
|
|
<code>[]string</code>
|
|
</td>
|
|
<td>
|
|
<p>Arguments to pass to the command when executing it.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>env</code><br/>
|
|
<a href="#kubelet-config-k8s-io-v1-ExecEnvVar"><code>[]ExecEnvVar</code></a>
|
|
</td>
|
|
<td>
|
|
<p>Env defines additional environment variables to expose to the process. These
|
|
are unioned with the host's environment, as well as variables client-go uses
|
|
to pass argument to the plugin.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
## `ExecEnvVar` {#kubelet-config-k8s-io-v1-ExecEnvVar}
|
|
|
|
|
|
**Appears in:**
|
|
|
|
- [CredentialProvider](#kubelet-config-k8s-io-v1-CredentialProvider)
|
|
|
|
|
|
<p>ExecEnvVar is used for setting environment variables when executing an exec-based
|
|
credential plugin.</p>
|
|
|
|
|
|
<table class="table">
|
|
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
|
|
|
|
<tr><td><code>name</code> <B>[Required]</B><br/>
|
|
<code>string</code>
|
|
</td>
|
|
<td>
|
|
<span class="text-muted">No description provided.</span></td>
|
|
</tr>
|
|
<tr><td><code>value</code> <B>[Required]</B><br/>
|
|
<code>string</code>
|
|
</td>
|
|
<td>
|
|
<span class="text-muted">No description provided.</span></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
## `FormatOptions` {#FormatOptions}
|
|
|
|
|
|
**Appears in:**
|
|
|
|
- [LoggingConfiguration](#LoggingConfiguration)
|
|
|
|
|
|
<p>FormatOptions contains options for the different logging formats.</p>
|
|
|
|
|
|
<table class="table">
|
|
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
|
|
|
|
<tr><td><code>json</code> <B>[Required]</B><br/>
|
|
<a href="#JSONOptions"><code>JSONOptions</code></a>
|
|
</td>
|
|
<td>
|
|
<p>[Alpha] JSON contains options for logging format "json".
|
|
Only available when the LoggingAlphaOptions feature gate is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
## `JSONOptions` {#JSONOptions}
|
|
|
|
|
|
**Appears in:**
|
|
|
|
- [FormatOptions](#FormatOptions)
|
|
|
|
|
|
<p>JSONOptions contains options for logging format "json".</p>
|
|
|
|
|
|
<table class="table">
|
|
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
|
|
|
|
<tr><td><code>splitStream</code> <B>[Required]</B><br/>
|
|
<code>bool</code>
|
|
</td>
|
|
<td>
|
|
<p>[Alpha] SplitStream redirects error messages to stderr while
|
|
info messages go to stdout, with buffering. The default is to write
|
|
both to stdout, without buffering. Only available when
|
|
the LoggingAlphaOptions feature gate is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>infoBufferSize</code> <B>[Required]</B><br/>
|
|
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue"><code>k8s.io/apimachinery/pkg/api/resource.QuantityValue</code></a>
|
|
</td>
|
|
<td>
|
|
<p>[Alpha] InfoBufferSize sets the size of the info stream when
|
|
using split streams. The default is zero, which disables buffering.
|
|
Only available when the LoggingAlphaOptions feature gate is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
## `LogFormatFactory` {#LogFormatFactory}
|
|
|
|
|
|
|
|
<p>LogFormatFactory provides support for a certain additional,
|
|
non-default log format.</p>
|
|
|
|
|
|
|
|
|
|
## `LoggingConfiguration` {#LoggingConfiguration}
|
|
|
|
|
|
**Appears in:**
|
|
|
|
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
|
|
|
|
|
<p>LoggingConfiguration contains logging options.</p>
|
|
|
|
|
|
<table class="table">
|
|
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
|
|
|
|
<tr><td><code>format</code> <B>[Required]</B><br/>
|
|
<code>string</code>
|
|
</td>
|
|
<td>
|
|
<p>Format Flag specifies the structure of log messages.
|
|
default value of format is <code>text</code></p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>flushFrequency</code> <B>[Required]</B><br/>
|
|
<a href="https://pkg.go.dev/time#Duration"><code>time.Duration</code></a>
|
|
</td>
|
|
<td>
|
|
<p>Maximum number of nanoseconds (i.e. 1s = 1000000000) between log
|
|
flushes. Ignored if the selected logging backend writes log
|
|
messages without buffering.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>verbosity</code> <B>[Required]</B><br/>
|
|
<a href="#VerbosityLevel"><code>VerbosityLevel</code></a>
|
|
</td>
|
|
<td>
|
|
<p>Verbosity is the threshold that determines which log messages are
|
|
logged. Default is zero which logs only the most important
|
|
messages. Higher values enable additional messages. Error messages
|
|
are always logged.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>vmodule</code> <B>[Required]</B><br/>
|
|
<a href="#VModuleConfiguration"><code>VModuleConfiguration</code></a>
|
|
</td>
|
|
<td>
|
|
<p>VModule overrides the verbosity threshold for individual files.
|
|
Only supported for "text" log format.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>options</code> <B>[Required]</B><br/>
|
|
<a href="#FormatOptions"><code>FormatOptions</code></a>
|
|
</td>
|
|
<td>
|
|
<p>[Alpha] Options holds additional parameters that are specific
|
|
to the different logging formats. Only the options for the selected
|
|
format get used, but all of them get validated.
|
|
Only available when the LoggingAlphaOptions feature gate is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
## `TracingConfiguration` {#TracingConfiguration}
|
|
|
|
|
|
**Appears in:**
|
|
|
|
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
|
|
|
|
|
|
<p>TracingConfiguration provides versioned configuration for OpenTelemetry tracing clients.</p>
|
|
|
|
|
|
<table class="table">
|
|
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
|
|
|
|
<tr><td><code>endpoint</code><br/>
|
|
<code>string</code>
|
|
</td>
|
|
<td>
|
|
<p>Endpoint of the collector this component will report traces to.
|
|
The connection is insecure, and does not currently support TLS.
|
|
Recommended is unset, and endpoint is the otlp grpc default, localhost:4317.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td><code>samplingRatePerMillion</code><br/>
|
|
<code>int32</code>
|
|
</td>
|
|
<td>
|
|
<p>SamplingRatePerMillion is the number of samples to collect per million spans.
|
|
Recommended is unset. If unset, sampler respects its parent span's sampling
|
|
rate, but otherwise never samples.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
## `VModuleConfiguration` {#VModuleConfiguration}
|
|
|
|
(Alias of `[]k8s.io/component-base/logs/api/v1.VModuleItem`)
|
|
|
|
**Appears in:**
|
|
|
|
- [LoggingConfiguration](#LoggingConfiguration)
|
|
|
|
|
|
<p>VModuleConfiguration is a collection of individual file names or patterns
|
|
and the corresponding verbosity threshold.</p>
|
|
|
|
|
|
|
|
|
|
## `VerbosityLevel` {#VerbosityLevel}
|
|
|
|
(Alias of `uint32`)
|
|
|
|
**Appears in:**
|
|
|
|
- [LoggingConfiguration](#LoggingConfiguration)
|
|
|
|
|
|
|
|
<p>VerbosityLevel represents a klog or logr verbosity threshold.</p>
|
|
|
|
|