cytopia / metrics-server-prom

Prometheus adapter to scrape from Kubernetes metrics-server
MIT License
21 stars 8 forks source link

Fix regular expression for Kubernetes v1.11.10 #12

Closed czerasz-flaconi closed 4 years ago

czerasz-flaconi commented 4 years ago

In Kubernetes v1.11.10 the command kubectl get pods -o wide --no-headers --all-namespaces returns data in the following format:

samba              samba-774f847d9b-2qrth                                             1/1   Running            0     1h    10.6.181.3    ip-10-0-0-2.eu-central-1.compute.internal     <none>

Example with headers:

$ kubectl get pods -o wide --all-namespaces
NAMESPACE               NAME                                                                    READY   STATUS              RESTARTS   AGE   IP                NODE                                             NOMINATED NODE
samba              samba-774f847d9b-2qrth                                             1/1   Running            0     1h    10.6.181.3    ip-10-0-0-2.eu-central-1.compute.internal     <none>
cytopia commented 4 years ago

Tagged with v0.10

I've removed the tag from this merge and will do it again after this one has been merged: #13