<p>I'm running Apache Flink in Standalone Kubernetes (sesion) mode without Job Manager HA. But I need to deploy Job Manager HA, because only in HA mode, Flink can be persistent (can save job's after job manager restart).
Flink runs in dedicated kubernetes namespace, and I have permissions only to namespace.</p>
<p>HA are enabled using this article:
<a href="https://ci.apache.org/projects/flink/flink-docs-master/docs/deployment/ha/kubernetes_ha/" rel="nofollow noreferrer">https://ci.apache.org/projects/flink/flink-docs-master/docs/deployment/ha/kubernetes_ha/</a></p>
<p>and I use yaml files from this article:
<a href="https://ci.apache.org/projects/flink/flink-docs-master/docs/deployment/resource-providers/standalone/kubernetes/#kubernetes-high-availability-services" rel="nofollow noreferrer">https://ci.apache.org/projects/flink/flink-docs-master/docs/deployment/resource-providers/standalone/kubernetes/#kubernetes-high-availability-services</a></p>
<p>I have for example k28s namespace named flink-namespace. In this namespace I've created:</p>
<ul>
<li>serviceAccount named flink-sa</li>
<li>role witch permissions to create/edit Configmaps in this namespace</li>
</ul>
<p>so this serviceAccount has permissions to create/editr configmaps, but only in this namespace.</p>
<p>After deployment, jobManager can't start and throws error:</p>
<p><em>Caused by: io.fabric8.kubernetes.client.KubernetesClientException: configmaps &quot;flink-restserver-leader&quot; is forbidden: User &quot;system:serviceaccount:flink-namespace:flink-sa&quot; cannot watch resource &quot;configmaps&quot; in API group &quot;&quot; in the namespace &quot;default&quot;</em></p>
<p>With mean that serviceAccount with Flink are using to manage Configmaps, try to create Configmap in namespace &quot;default&quot; not in namespace &quot;flink-namespace&quot;</p>
<p>Does anybody know how to config flink to manage configmaps in specified namespace ?</p>

<p>Problem solved - possibility to tell Flink in with kubernetes namespace is running I found in Flink source code.
So, to solve this problem you should set this in config:</p>
<p><em>kubernetes.namespace: YOUR_NAMESPACE_NAME</em></p>
