Prometheus and Kubernetes

At work we’ve started to instrument our micro-services with Prometheus. The combination of Prometheus and Grafana is pretty amazing.

One of the nice things Prometheus does is auto-discovery of services in a Kubernetes cluster. The docs for this area aren’t bad but I couldn’t find a complete example so here’s the configuration we use.

  - job_name: 'kubernetes'
    kubernetes_sd_configs:
      - api_servers:
          -  'https://kubernetes.default.svc'
        in_cluster: true
    relabel_configs:
      - regex: "__meta_kubernetes_role"
        action: labelmap
        replacement: "kubernetes_role"
      - regex: "__meta_kubernetes_node_label_(.*)"
        action: labelmap
        replacement: "kubernetes_node_label_${1}"
      - regex: "__meta_kubernetes_service_namespace"
        action: labelmap
        replacement: "kubernetes_service_namespace"
      - regex: "__meta_kubernetes_service_name"
        action: labelmap
        replacement: "kubernetes_service_name"
      - regex: "__meta_kubernetes_service_label_(.*)"
        action: labelmap
        replacement: "kubernetes_service_label_${1}"
      - regex: "__meta_kubernetes_service_annotation_(.*)"
        action: labelmap
        replacement: "__meta_kubernetes_service_annotation_${1}"

 

Book: The Art of Network Architecture

I recently finished reading The Art of Network Architecture. If I remember correctly, I found out about this book during an episode of the Packet Pushers where the author participated.

I ordered the book based on the promise of discussion of SDN use cases and SDN networking in general. It turns out that this wasn’t the best book to dig into that area but it does offer a nice overview and reminder of networking concepts across all areas of networking from design to management. So while parts are a bit fluffy and common sense, it was worth reading in the same way a good survey paper is.

Seveneves

Last night I finally finished reading Seveneves (Indigo, Amazon) by Neal Stephenson. I don’t know, or really want to know, how many pages this beast was (I bought the digital version) but it even though it was very compelling it still felt like it took a long time to read. I found myself staying up later than I planned several times.

If you liked The Martian you will like this book. It’s slightly less ‘sciency’ and has more of an epic feel. The odd part was that I got into it enough that I started to view the world through the book’s lens. After you’ve read it you will understand.

9/10 – Well worth the time investment.

In-band Network Telemetry

I’ve done a bit of research into P4 recently. Figuring out if the IP-[TCP/UDP] mono-culture is here stay is a long-term interest of mine and P4 is perhaps one way to break that mono-culture.

One of the use cases presented for P4 is in-band telemetry. None of this really requires P4 but it’s interesting to think about hardware driven implementations.

P4 In-band Network Telemetry

Paper

Google gcloud and API rate limits

Lately we’ve been making use of the Google Pub/Sub service at work. During development I ran into continual problems with API rate limits doing a modest number of API requests.

After some investigation with the Google support people (we have Gold support) it turns out that if you use the default authentication provided by the ‘gcloud’ command in your local development environment, you get different rate limits than a service account does.

I lost a lot of time trying to optimize for these API rate limit errors. Hopefully this little note will stop someone else from having to go through the same pain.

A couple weeks with the Nexus 6p

As I wrote a couple weeks ago, I switched to a Nexus 6p from a Samsung S6 mostly because the lack of software updates was frustrating.

Here are a few random thoughts on the Nexus 6p now that I’ve used it for a couple weeks:

  • The hardware build quality is almost as good as the Galaxy S6. Certainly better than the Galaxy S4.
  • The screen is quite nice but the colors are a bit weird until you turn on the developer options and enable the sRGB mode. This really should be the default setting.
  • No un-installable carrier bloatware and Samsung apps is a big plus. Not being able to delete the Bell TV app or Microsoft OneDrive (because Samsung made a deal with them) was stupid and annoying. It also highlights how little respect Samsung has for the end user vs. trying to please the carriers.
  • The raw benchmarks on the Galaxy S6 beat the Nexus 6p but the 6p feels much faster during normal use. I don’t know the cause for certain but to whatever extent this is a result of TouchWiz, Samsung should just quit trying to do user facing software. They are horrible at it.

So far my experience is that the Nexus 6p is an upgrade from the Galaxy S6.