- .github
- devel
- doc
-
examples
-
dynamic-client
-
notebooks
-
watch
-
yaml_dir
- README.md
- __init__.py
- annotate_deployment.py
- api_discovery.py
- apply_from_dict.py
- apply_from_directory.py
- apply_from_single_file.py
- cluster_scoped_custom_object.py
- cronjob_crud.py
- deployment_create.py
- deployment_crud.py
- duration-gep2257.py
- in_cluster_config.py
- ingress_create.py
- job_crud.py
- multiple_clusters.py
- namespaced_custom_object.py
- node_labels.py
- out_of_cluster_config.py
- pick_kube_config_context.py
- pod_config_list.py
- pod_exec.py
- pod_portforward.py
- remote_cluster.py
- rollout-daemonset.py
- rollout-statefulset.py
-
dynamic-client
- kubernetes
- scripts
- .gitignore
- CHANGELOG.md
- CONTRIBUTING.md
- LICENSE
- MANIFEST.in
- OWNERS
- README.md
- SECURITY_CONTACTS
- code-of-conduct.md
- codecov.yml
- requirements.txt
- setup.cfg
- setup.py
- test-requirements.txt
- tox.ini
Explanation
The V1PodDNSConfig
class represents a configuration for DNS resolution within a Kubernetes pod. It’s used to specify custom DNS servers, search domains, and options for resolving hostnames.
nameservers
: A list of IP addresses for DNS servers. These are appended to the default nameservers determined by the pod’sDNSPolicy
.options
: A list of DNS resolver options, which are merged with the default options based on the pod’sDNSPolicy
. These options can override the defaults.searches
: A list of DNS search domains. These are used to resolve hostnames in the form ofhostname.searchdomain
. They are appended to the default search domains.
The class provides methods for accessing and modifying these attributes. For example, the nameservers
property allows you to retrieve or set the list of DNS servers. The to_dict()
method converts the object to a Python dictionary, suitable for serialization to JSON. The to_str()
method converts the object to a string representation.
This class is part of the Kubernetes client library for Python, designed to interact with Kubernetes APIs. It’s automatically generated from the Kubernetes API specifications, ensuring compatibility with the latest Kubernetes versions.
Graph
The graph shows the usage of functions within the codebase.
Select a code symbol to view it's graph