Difference between revisions of "Kind: ConfigMap"
Jump to navigation
Jump to search
(15 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
+ | * [[Configure a Pod to Use a ConfigMap]] | ||
+ | |||
[[ConfigMap]] | [[ConfigMap]] | ||
− | apiVersion: v1 | + | [[apiVersion: v1]] |
kind: ConfigMap | kind: ConfigMap | ||
− | metadata: | + | [[metadata:]] |
... | ... | ||
data: | data: | ||
Line 10: | Line 12: | ||
[[immutable]]: true | [[immutable]]: true | ||
− | + | apiVersion: v1 | |
kind: ConfigMap | kind: ConfigMap | ||
− | |||
metadata: | metadata: | ||
− | name: nginx-config | + | name: [[nginx-config]] |
namespace: [[nginx-ingress]] | namespace: [[nginx-ingress]] | ||
data: | data: | ||
Line 20: | Line 21: | ||
real-ip-header: "proxy_protocol" | real-ip-header: "proxy_protocol" | ||
set-real-ip-from: "0.0.0.0/0" | set-real-ip-from: "0.0.0.0/0" | ||
+ | |||
+ | apiVersion: v1 | ||
+ | kind: ConfigMap | ||
+ | metadata: | ||
+ | name: tcp-services | ||
+ | namespace: [[ingress-nginx]] | ||
+ | data: | ||
+ | 9000: "default/example-go:8080" | ||
+ | |||
+ | <pre> | ||
+ | apiVersion: v1 | ||
+ | kind: ConfigMap | ||
+ | metadata: | ||
+ | name: game-demo | ||
+ | data: | ||
+ | # property-like keys; each key maps to a simple value | ||
+ | player_initial_lives: "3" | ||
+ | ui_properties_file_name: "user-interface.properties" | ||
+ | |||
+ | # file-like keys | ||
+ | game.properties: | | ||
+ | enemy.types=aliens,monsters | ||
+ | player.maximum-lives=5 | ||
+ | user-interface.properties: | | ||
+ | color.good=purple | ||
+ | color.bad=yellow | ||
+ | allow.textmode=true | ||
+ | </pre> | ||
== Related == | == Related == | ||
+ | * <code>[[kubectl create configmap]]</code> | ||
* <code>[[kind: Ingress]]</code> | * <code>[[kind: Ingress]]</code> | ||
+ | * [[CKA v1.23 Use ConfigMaps and Secrets to configure applications]] | ||
+ | * [[Corefile]] | ||
+ | * <code>[[aws-auth]]</code> | ||
+ | * [[Pushing a Helm chart to ECR]] | ||
+ | * <code>[[Kubernetes Persistent Volumes (PV)|volumes:]]</code> | ||
== See also == | == See also == | ||
* {{kind}} | * {{kind}} | ||
− | + | * {{ConfigMap}} | |
[[Category:Kubernetes]] | [[Category:Kubernetes]] |
Latest revision as of 07:54, 26 February 2024
ConfigMap
apiVersion: v1 kind: ConfigMap metadata: ... data: ... immutable: true
apiVersion: v1 kind: ConfigMap metadata: name: nginx-config namespace: nginx-ingress data: proxy-protocol: "True" real-ip-header: "proxy_protocol" set-real-ip-from: "0.0.0.0/0"
apiVersion: v1 kind: ConfigMap metadata: name: tcp-services namespace: ingress-nginx data: 9000: "default/example-go:8080"
apiVersion: v1 kind: ConfigMap metadata: name: game-demo data: # property-like keys; each key maps to a simple value player_initial_lives: "3" ui_properties_file_name: "user-interface.properties" # file-like keys game.properties: | enemy.types=aliens,monsters player.maximum-lives=5 user-interface.properties: | color.good=purple color.bad=yellow allow.textmode=true
Related[edit]
kubectl create configmap
kind: Ingress
- CKA v1.23 Use ConfigMaps and Secrets to configure applications
- Corefile
aws-auth
- Pushing a Helm chart to ECR
volumes:
See also[edit]
kind:
[Pod | Ingress | ClusterConfiguration
|Config | ConfigMap | ServiceAccount | Deployment | List | Secret | Status ], spec: metadata: data:
- ConfigMaps:
kubectl [ get | edit | describe | create | delete ] configmaps
,aws-auth
, Kustomize,kind: ConfigMap, ConfigMapRef, envFrom
Advertising: