Skip to content

populate your local /etc/hosts with k8s Ingress Resources.

License

Notifications You must be signed in to change notification settings

wakeful/glasses

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glasses

see all the Ingress resources from k8s.

Installation

macOS

$ brew tap wakeful/selection
$ brew install glasses

Linux

curl -Lo glasses https://github.com/wakeful/glasses/releases/download/0.2.0/glasses-linux-amd64 && chmod +x glasses && sudo mv glasses /usr/sbin/

src

go get -u github.com/wakeful/glasses

Usage

help mode:

$ glasses -h
Usage of glasses:
  -host-file string
        host file location (default "/etc/hosts")
  -write
        rewrite host file?

dry-run mode:

$ glasses
# reading k8s ingress resource...
192.168.99.100 grafana.local     # sad-chicken-grafana
192.168.99.100 prometheus.local  # your-turkey-prometheus

populate your /etc/hosts file:

$ sudo -E glasses -write
# reading k8s ingress resource...
192.168.99.100 grafana.local     # sad-chicken-grafana
192.168.99.100 prometheus.local  # your-turkey-prometheus

$ cat /etc/hosts
# generated using glasses start #
192.168.99.100 grafana.local     # sad-chicken-grafana
192.168.99.100 prometheus.local  # your-turkey-prometheus

# generated using glasses end #