kubeless is a Kubernetes-native serverless framework that lets you deploy small bits of code without having to worry about the underlying infrastructure plumbing. It leverages Kubernetes resources to provide auto-scaling, API routing, monitoring, troubleshooting and more.

  1. Download the kubeless CLI from the release page. (OSX users can also use brew: brew install kubeless).
  2. Create a kubeless namespace (used by default)
  3. Then use one of the YAML manifests found in the release page to deploy kubeless. It will create a functions Custom Resource Definition and launch a controller.
  4. install kafka: kubectl apply -f https://github.com/kubeless/kubeless/releases/download/v0.6.0/kafka-zookeeper-v0.6.0.yaml
  5. install kubeless UI kubectl create -f https://raw.githubusercontent.com/kubeless/kubeless-ui/master/k8s.yaml

Appendix: fixed kubeless UI, added role for list/get configmap. otherwise UI can’t see runtime.

---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: ui-acct
  namespace: kubeless
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: kubeless-ui
rules:
- apiGroups:
  - ""
  resources:
  - pods
  - pods/log
  verbs:
  - get
  - list
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - get
  - list
- apiGroups:
  - kubeless.io
  resources:
  - functions
  verbs:
  - get
  - list
  - watch
  - update
  - create
  - delete
- apiGroups:
  - ""
  resources:
  - services
  - services/proxy
  verbs:
  - get
  - list
  - proxy
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: kubeless-ui
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: kubeless-ui
subjects:
- kind: ServiceAccount
  name: ui-acct
  namespace: kubeless
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
   controller: ui
  namespace: kubeless
  name: ui
spec:
  replicas: 1
  selector:
    matchLabels:
     controller: ui
  template:
    metadata:
      labels:
        controller: ui
    spec:
      containers:
      - name: ui
        image: bitnami/kubeless-ui:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
          protocol: TCP
      - name: proxy
        image: kelseyhightower/kubectl:1.4.0
        imagePullPolicy: IfNotPresent
        args:
        - proxy
        - "-p"
        - "8080"
        imagePullPolicy: Always
      serviceAccountName: ui-acct
---
apiVersion: v1
kind: Service
metadata:
  labels:
    controller: ui
  name: ui
  namespace: kubeless
spec:
  ports:
  - name: ui-port
    port: 3000
    protocol: TCP
    targetPort: 3000
  selector:
    controller: ui
  sessionAffinity: None
  type: NodePort