Difference between revisions of "Kubernetes ConfigMaps"
Jump to navigation
Jump to search
↑ https://github.com/kubernetes/enhancements/issues/1412
(27 intermediate revisions by 5 users not shown) | |||
Line 7: | Line 7: | ||
* <code>[[kubectl get configmaps]]</code> | * <code>[[kubectl get configmaps]]</code> | ||
* <code> [[kubectl describe configmaps]] YOUR_CONFIG_MAP_NAME</code> | * <code> [[kubectl describe configmaps]] YOUR_CONFIG_MAP_NAME</code> | ||
+ | * <code>[[kubectl edit configmap]]</code> | ||
− | [[EKS]] | + | [[EKS]] (<code>[[aws-auth]]</code> [[configmap]]) |
* <code>[[kubectl edit -n kube-system configmap/aws-auth]]</code> | * <code>[[kubectl edit -n kube-system configmap/aws-auth]]</code> | ||
* <code>[[kubectl describe -n kube-system configmap/aws-auth]]</code> | * <code>[[kubectl describe -n kube-system configmap/aws-auth]]</code> | ||
+ | == Examples == | ||
+ | {{configmap examples}} | ||
+ | |||
+ | == Errors == | ||
[[helm list]] | [[helm list]] | ||
− | [[Error: configmaps is forbidden]]: User "system:serviceaccount:kube-system:default" cannot list resource "configmaps" in API group "" in the namespace "kube-system" | + | [[Error: configmaps is forbidden]]: User "[[system:serviceaccount]]:kube-system:default" cannot list resource "configmaps" in API group "" in the namespace "kube-system" |
== Activities == | == Activities == | ||
* [[CKA v1.23]]: [[Use ConfigMaps and Secrets to configure applications]] | * [[CKA v1.23]]: [[Use ConfigMaps and Secrets to configure applications]] | ||
* [[CKA v1.15]], [[CKA v1.21]]: Understand [[ConfigMaps]] | * [[CKA v1.15]], [[CKA v1.21]]: Understand [[ConfigMaps]] | ||
+ | * [[Configure a Pod to Use a ConfigMap]] | ||
+ | * [[Configuring Redis using a ConfigMap]] | ||
== News == | == News == | ||
* Aug 2020 [[Kubernetes v1.19]] [[Immutable]] [[Kubernetes secrets|Secrets]] and [[ConfigMaps]] <ref>https://github.com/kubernetes/enhancements/issues/1412</ref> | * Aug 2020 [[Kubernetes v1.19]] [[Immutable]] [[Kubernetes secrets|Secrets]] and [[ConfigMaps]] <ref>https://github.com/kubernetes/enhancements/issues/1412</ref> | ||
+ | |||
+ | == Errors == | ||
+ | {{is missing}} | ||
== Related terms == | == Related terms == | ||
* [[Deployment]], [[Service]], [[Secrets]] | * [[Deployment]], [[Service]], [[Secrets]] | ||
− | * [[Terraform]]: [[kubernetes_config_map]] https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/config_map ([[ConfigMap]]) | + | * [[Terraform]]: [[kubernetes_config_map]] |
+ | https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/config_map ([[ConfigMap]]) | ||
+ | * [[Terraform resource: kubernetes config map v1 data]] | ||
* <code>[[kind: ConfigMap]]</code> | * <code>[[kind: ConfigMap]]</code> | ||
* [[Terraform resource: kubernetes_config_map]] | * [[Terraform resource: kubernetes_config_map]] | ||
* [[Sidecar container]] | * [[Sidecar container]] | ||
− | |||
* [[Kustomize]] | * [[Kustomize]] | ||
* <code>[[configMapRef:]]</code> | * <code>[[configMapRef:]]</code> | ||
− | * [[data:]] | + | * <code>[[data:]]</code> |
* <code>[[Error: kind ConfigMap]]</code> | * <code>[[Error: kind ConfigMap]]</code> | ||
* <code>[[Error: UPGRADE FAILED: kind ConfigMap with the name "you-configmap-name" in "your-env" already exists]]</code> | * <code>[[Error: UPGRADE FAILED: kind ConfigMap with the name "you-configmap-name" in "your-env" already exists]]</code> | ||
+ | * [[Already exists in the cluster]] | ||
+ | * [[Kubernetes HostPath volume provider]] | ||
+ | * <code>[[projected]]</code> | ||
+ | * <code>[[cattle-project]]</code> | ||
== See also == | == See also == |
Latest revision as of 09:46, 22 October 2024
A ConfigMap
is an API object used to store non-confidential data in key-value pairs. Pods can consume ConfigMaps
as environment variables, command-line arguments, or as configuration files in a volume.
https://kubernetes.io/docs/concepts/configuration/configmap/
Commands[edit]
kubectl create configmap <map-name> <data-source>
kubectl get configmaps
kubectl describe configmaps YOUR_CONFIG_MAP_NAME
kubectl edit configmap
Examples[edit]
kube-root-ca.crt configMap
aws-auth configMap
nginx-controller, ingress-nginx-controller ConfigMap
argocd-cm configMap
Corefile
from CoreDNS
Errors[edit]
helm list Error: configmaps is forbidden: User "system:serviceaccount:kube-system:default" cannot list resource "configmaps" in API group "" in the namespace "kube-system"
Activities[edit]
- CKA v1.23: Use ConfigMaps and Secrets to configure applications
- CKA v1.15, CKA v1.21: Understand ConfigMaps
- Configure a Pod to Use a ConfigMap
- Configuring Redis using a ConfigMap
News[edit]
- Aug 2020 Kubernetes v1.19 Immutable Secrets and ConfigMaps [1]
Errors[edit]
Warning: resource configmaps/kube-root-ca.crt is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically. secret/default-token-7z4zd created Error from server (Conflict): error when applying patch: .../... to: Resource: "/v1, Resource=configmaps", GroupVersionKind: "/v1, Kind=ConfigMap" Name: "kube-root-ca.crt", Namespace: "your-namespace" for: "your.yaml": Operation cannot be fulfilled on configmaps "kube-root-ca.crt": the object has been modified; please apply your changes to the latest version and try again
Related terms[edit]
https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/config_map (ConfigMap)
- Terraform resource: kubernetes config map v1 data
kind: ConfigMap
- Terraform resource: kubernetes_config_map
- Sidecar container
- Kustomize
configMapRef:
data:
Error: kind ConfigMap
Error: UPGRADE FAILED: kind ConfigMap with the name "you-configmap-name" in "your-env" already exists
- Already exists in the cluster
- Kubernetes HostPath volume provider
projected
cattle-project
See also[edit]
- AWS IAM Authenticator for Kubernetes:
aws-auth, kubectl edit -n kube-system configmap/aws-auth, eksctl create iamidentitymapping
,mapUsers:, mapRoles:, mapAccounts:
- ConfigMaps:
kubectl [ get | edit | describe | create | delete ] configmaps
,aws-auth
, Kustomize,kind: ConfigMap, ConfigMapRef, envFrom
- Kubectl information commands:
cluster-info
|view
|pods
|nodes
|services
|version
|describe | logs
Advertising: