Skip to content

Latest commit

 

History

History

blog_k8s_containers_restarts

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Container Restarts Watcher

Building and running the restart watcher:

Build

Run the following command in the current directory:

go build -o artifacts/restart-watcher ./main.go

Or if you prefer, you can build docker image using:

docker build .

Running

Running the watcher is straightforward, just run the following after building:

# this will use kubeconfig default path: "~/.kube/config"
./artifacts/restart-watcher

# if using docker
docker run -v ~/.kube:/root/.kube <image_name>

# if your kubeconfig resides in other path you can specify it by running :
./artifacts/restart-watcher --kubeconfig /custom/path/config