Hey, currently I have scheduled a pod on my Kubernetes cluster which has a go script and I am using client-go APIs to interact with the configmaps from inside my pod.
I have created Role and Rolebinding for that purpose.
apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: namespace: default name: configmap-updater rules: - apiGroups: ["*"] resources: ["configmaps"] resourceNames: ["target-configmap"] verbs: ["get", "create", "update", "delete"]
kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: demo-rolebinding namespace: default labels: app: tools-rbac1 subjects: - kind: Group name: system:service apiGroup: rbac.authorization.k8s.io roleRef: kind: Role name: configmap-updater apiGroup: ""
Currently I am able to GET the configmap but I am unable to UPDATE it.
So is it even possible to update configmaps from pods. If yes, then what part of it I am missing.
Kubernetes version: v1.21.1
Host OS: RHEL 8.1