Skip to content

Instantly share code, notes, and snippets.

@alexellis
Last active July 16, 2020 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexellis/72a9fcd68d1fd1f692ed372d79152f2e to your computer and use it in GitHub Desktop.
Save alexellis/72a9fcd68d1fd1f692ed372d79152f2e to your computer and use it in GitHub Desktop.
Insiders Update 7th July 2019 - Happy `#FaaSFriday` from the Peak District! 🌴

Welcome to this week's Insiders Update, Insiders are those who are sponsoring me on GitHub, backing me on Patreon, or companies sponsoring openfaas.com. This starts from 5 USD / mo for exclusive access to updates, news and new content. https://github.com/users/alexellis/sponsorship

Insiders Update 7th July 2019 - Happy #FaaSFriday from the Peak District! 🌴

My wife and I

See more of our photos

Today's Insiders Update is brought to you from the Peak District of Derbyshire in the UK. The Peaks are home to Chatsworth House, Dovedale, Mam Tor, dismantled railways, and the Bakewell pudding. I would highly recommend a walking holiday in this area.

Kubernetes πŸ–₯

Pod limits

There is a built-in (soft) limit of 110 Pods per node in Kubernetes. So if you have 2x 64-core nodes, you cannot schedule more than 220 Pods successfully.

Read up on how to change it: Kubernetes Pod limit

Want to try managed k3s?

Civo are building a managed k3s service for development. Check it out and let them know what you want to see: https://twitter.com/alexellisuk/status/1150824469797228546

Free video course from Nigel Poulton

Nigel is an excellent course author and very well known on Pluralsight.com. Sign up for this free content:

Getting Started with Kubernetes

Changes you have to make for 1.16

There are several Kubernetes APIs which are moving from one place to another. I found the messaging in the blog post a little confusing, but what it means is that you need to edit all of your YAML files for the following:

  • NetworkPolicy
  • PodSecurityPolicy
  • DaemonSet, Deployment, StatefulSet, and ReplicaSet
  • Ingress

If you automate Kubernetes, or have built a platform upon it (i.e. OpenFaaS, or your CI/CD pipeline at work) then there may be some significant overhaul for you. The good news it that it's relatively straight-forward:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: markdownrender
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: markdownrender
    spec:
      containers:
      - name: markdownrender
        image: functions/markdownrender:latest-armhf
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
          protocol: TCP

Becomes:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: markdownrender
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: markdownrender
    spec:
      containers:
      - name: markdownrender
        image: functions/markdownrender:latest-armhf
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
          protocol: TCP

For a complete list, see: this blog post

If you encounter any issues with OpenFaaS, then please let me know on Slack, or raise an issue on GitHub.

Raspberry Pi 🍰

Grab one of the fan-shims to make sure your RPi4 doesn't throttle due to temperatures soaring over 80C

k3s is now my recommended Kubernetes distribution for RPi

OpenFaaS πŸ†

Traffic-shifting with Linkerd2

Are you tired of hearing about Service Mesh? Linkerd2 is a light-weight mesh that uses minimal resources, introduces very little latency and serves a useful purpose.

Here's a tutorial I wrote with Matias Pan from the OpenFaaS GitHub members group:

  • mTLS - e2e encryption between Pods / services / functions
  • detailed latency and metrics - find out how your code is actually performing
  • more balanced proxying on HTTP/1.1 (when Keep-Alive is used) and HTTP/2

The 2.4 release adds traffic-shifting which I'm very excited about. Traffic-shifting enables canary and blue/green deployments of functions. You can send 10% of traffic to the new version and 90% to the old version and gradually switch it over.

Here's a photo of community member Keiran Smith demoing my example, live at Cloud Native Edinburgh!

Keiran

View the tweet and grab his slides here

Call for Participation

The community needs your input with these issues:

Is this something you would like to see?

Logs come to OpenFaaS - the first blog

Vivek Singh has written up the first blog post on how to use logs in OpenFaaS with faas-cli or the REST API.

Read Vivek's post here

Track the progress for other providers here: Suggestion: surface logs in REST API

Traction for OpenFaaS Cloud

I'm seeing more and more traction of OpenFaaS Cloud which is really encouraging. There are two ways you can try OpenFaaS Cloud.

You'll get:

πŸ’¬ Automatic CI/CD with public/private @github πŸ’¬ Free endpoints with TLS πŸ’¬ Custom subdomains πŸ’¬ Dozens of languages supported

IBM calling: Serverless Power, anyone?

We've had an interest in the community from half a dozen developers both at IBM and within the broader community that want to see OpenFaaS come to the Power platform.

Power Systems is a family of server computers from IBM that are based on its POWER processors.

Supporting other platforms and architectures is something that we're used to. You may have seen one of my many blog posts on Raspberry Pi Clusters.

If you have an interest in this work, then please comment on the issue: Proposal: Add ppc64le support

Store functions

Anyone can submit a function to the OpenFaaS Function Store.

Endre sent in his new function which traces photos to produce line-drawings. He's packaged it as a function for everyone to use:

See an example here

Why don't you try it out with your own photos at tweet to @openfaas?

Popular repos this week πŸ“ˆ

  • jaas - create ad-hoc / one-shot jobs for Docker Swarm. This is a tool for DevOps engineers who have to run regular jobs to clean up state, re-index databases, send emails, and a plethora of other tasks.

  • inlets - I tweeted asking for help to get inlets over the the line to 3k stars, it ended up on the front page of Hacker News and "Show HN" the day after. It's now broken through 4k and has had a surge in downloads and git clones. Awesome! Check it out for when you want to tunnel between networks - whether internal-internal or external-external or some combination of the two. Think "ngrok, but free and Open Source"

  • hash-browns - Generate SHA256 hashes in Go with Prometheus metrics - use this example to learn more about Prometheus and how to instrument your cloud native applications

Wrapping up

Despite my being away for a week, the community has been as busy as ever. If you would like to see something feature in next week's update, please send it across to me on Slack.

  • Need help with Cloud Native / Developer-experience or OpenFaaS? Book a drop-in session with me via https://calendly.com/alexellis

  • Contribute & connect

Connect with the community

Contribute to OpenFaaS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment