Public | Automated Build

Last pushed: 2 years ago
Short Description
Simple Kubernetes Microservice to find all the IP addresses of Pods that have a set of labels
Full Description

kubernetes-pod-ip-finder

Simple Kubernetes Microservice to find all the IP addresses of Pods that have a set of labels. Exposes a simple REST API.

Prerquisties

This Docker image needs to be run in a Kubernetes Cluster. You need to first create a Kubernetes Cluster and set up the kubectl tool. See the guide to learn how to create and configure a cluster.

Download the controller.yaml and service.yaml files to install the service in your cluster.

How to Use

  1. Launch Service
    • kubectl create -f service.yaml
  2. Launch Controller
    • kubectl create -f controller.yaml
  3. To find all Pod IP addresses
    • http://kubernetes-pod-ip-finder/
  4. To find all Pod IP addresses with the label: "env: test"
    • http://kubernetes-pod-ip-finder/?env=test
  5. To find all Pod IP addresses with the labels: "env: test" and "role: database"
    • http://kubernetes-pod-ip-finder/?env=test&role=database
  6. The service will return an Array of IP addresses that match the labels
    • ["10.168.9.14","10.168.3.27"]

Note: This is not an official Google product

Docker Pull Command
Owner
thesandlord

Comments (0)