While having a consul template is useful, there is one thing to keep in mind, for example: the script that will be run after checking for any changes to the consul service discovery, should be located in a different folder; otherwise it will throw the following error.

root@server-dc-01:/etc/consul-template.d# /usr/local/bin/consul-template -config=/etc/consul-template.d 
2022/10/20 15:44:27 [ERR] (cli) walk error: from file: /etc/consul-template.d/lala: error decoding config: At 2:1: key ‘echo “h
ola”’ expected start of object (‘{‘) or assignment (‘=’)


/usr/local/bin/consul-template -config=/etc/consul-template.d


  1. Move the script out of the consul-template.d directory and might be fixed.



This was a tough task to find a way to expose a port from a container to localhost

  1. Installa desired chart, in this case maraidb service
helm install bitnami/mariadb — version 9.0.1

2. Expose port to localhost

kubectl expose pod mariadb-1605841351–0 — name mariadb-3306 — type LoadBalancer — port 3306 — protocol TCP

3. Validate if port is open to localhost


netstat -anvp tcp | awk 'NR<3'|| /LISTEN/’


netst -tlpn |grep 3306

4. Connect to port