|
How to delete Kubernetes ConfigMap
Author: Venkata Sudhakar
The below example shows how to delete a Kubernetes ConfigMap.
01 | $ kubectl get configmaps example-configmap -o yaml |
04 | connection.url: jdbc:mysql: |
06 | keys: "aws.access.key=AAAAAAAAAA \naws.secret.key=BBBBBBBBBB\n" |
11 | kubectl.kubernetes.io/last-applied-configuration: | |
12 | { "apiVersion" : "v1" , "data" :{ "connection.url" : "jdbc:mysql://localhost:3306/bethecoder" , "database" : "mysql" , "keys" : "aws.access.key=AAAAAAAAAA \naws.secret.key=BBBBBBBBBB\n" , "username" : "abcd" }, "kind" : "ConfigMap" , "metadata" :{ "annotations" :{}, "name" : "example-configmap" , "namespace" : "default" }} |
13 | creationTimestamp: "2021-03-06T20:46:54Z" |
14 | name: example-configmap |
16 | resourceVersion: "2378" |
17 | selfLink: /api/v1/namespaces/ default /configmaps/example-configmap |
18 | uid: c354a51b-b4ca-4d3c-83b7-a62bdecb99b8 |
20 | $ kubectl get configmaps example-configmap |
22 | example-configmap 4 7m18s |
24 | $ kubectl delete configmap example-configmap |
25 | configmap "example-configmap" deleted |
27 | $ kubectl get configmaps example-configmap |
28 | Error from server (NotFound): configmaps "example-configmap" not found |
|
|