Skip to main content
Version: v0.25.2

Kubernetes configmaps

The KubernetesRetriever will access flags in a Kubernetes ConfigMap via the Kubernetes Go client


import (
restclient ""

config, _ := restclient.InClusterConfig()
err = ffclient.Init(ffclient.Config{
PollingInterval: 3 * time.Second,
Retriever: &ffclient.KubernetesRetriever{
Path: "file-example.yaml",
Namespace: "default"
ConfigMapName: "my-configmap"
Key: "somekey.yml"
ClientConfig: &config
defer ffclient.Close()

Configuration fields

To configure your retriever:

NamespaceThe namespace of the ConfigMap.
ConfigMapNameThe name of the ConfigMap.
KeyThe key within the ConfigMap storing the flags.
ClientConfigThe configuration object for the Kubernetes client

Get the latest GO Feature Flag updates