Skip to content

Mirror your Kubernetes configMaps/secrets to Consul

License

Notifications You must be signed in to change notification settings

hasusuf/kube2consul

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kube2consul

Go Report Card license

kube2consul connect to your Kubernetes cluster and mirror secrets that has name ended with -secret and configMaps that has name ended with -config as well to Consul. At the moment this restriction is hardcoded. However it might be configurable in the future releases.

Prerequisites

  • Your $KUBECONFIG should be assigned to a valid kubeconfig file.

Installation

$ RELEASE=$(curl --silent "https://api.github.com/repos/hasusuf/kube2consul/releases/latest" | sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')
$ wget https://github.com/hasusuf/kube2consul/releases/download/$RELEASE/kube2consul-`uname -s`-`uname -m`
$ sudo install -m 755 kube2consul-`uname -s`-`uname -m` /usr/local/bin/kube2consul

Usage

  • Sync Kubernetes secrets/configMaps to Consul, outside the cluster
    kube2consul sync --context minikube --namespace tools --consul-uri 10.83.46.158:8500
  • Sync Kubernetes secrets/configMaps to Consul, inside the cluster
    kube2consul sync --namespace tools