FreeKB - OpenShift Edit Config Map using the oc edit command
OpenShift - Edit Config Map using the oc edit command

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

config map contains files, variables, and command line options that can be used by one or more applications, as a way to create separation between applications and the files, variables, and command line options being used by the applications.

For example, a config map named log-level could contain the variable log_level: INFO, and then one or more pods could use the log-level config map to set their log level to INFO.

 

The oc get configmaps command can be used to list the config maps in a namespace.

~]$ oc get configmaps --namespace default
NAME        DATA      AGE
krb5-conf   1         44d

 

The oc describe configmap command can be used to show the files, variables, and command line options that are defined in the config map.

~]$ oc describe configmap krb5-conf   
Name:         krb5-conf
Namespace:    myproject
Labels:       <none>
Annotations:  <none>

Data
====
krb5.conf:
----
[libdefaults]
 default_realm = DEFAULT.EXAMPLE.COM
 
[realms]
 DEFAULT.EXAMPLE.COM = {
  kdc = server1.default.example.com
  kdc = server2.default.example.com
 }
  
[domain_realm]
 default.example.com = DEFAULT.EXAMPLE.COM
 .default.example.com = DEFAULT.EXAMPLE.COM

Events:  <none>

 

The oc edit command can be used to edit the config map.

oc edit configmap krb5-conf 

 

If the edit is successful, meaning there are no syntax errors, something like this should be returned.

configmap/krb5-conf edited

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 94c15 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |