New Kubernetes Meta

Forget about image building. CI? We don't need it. This is the next big thing kubernetes, and containers in general

Just Stick It In The YAML

containers:
  pony-client:
    image: python:3
    command:
      - sh
      - '-c'
      - |
          python <<EOF
          import random
          import requests
          import os
          import time

          if __name__ == "__main__":
            url = os.environ["PONY_API"] + '/ponies/'

            while True:
                if random.randint(1, 100) > 99:
                  requests.post(url + '2/vote')
                else:
                  requests.get(url)
              time.sleep(int(os.environ['SLEEP']))
          EOF

this doesn't work as-is because requests isn't in the standard python image but that's an implementation detail

Pros

  • No complicated build pipeline
  • Easy deployment
  • self-documenting (it's right there!)
  • basically serverless

Cons

  • Can't think of any