Installing Keel

Keel runs as a single container and is available on DockerHub

Keel can run anywhere and will do its job as long as it can connect to your Kubernetes environment. Since you have (or plan to have) Kubernetes environment, this guide will show you how to deploy Keel inside your Kubernetes cluster.

Keel installation consists of:

Prerequisites

Configuration sample files are available in Keel repository on GitHub here.

Creating service account

Keel will be updating deployments, so let’s create a new service account in keel namespace:

kubectl create serviceaccount keel --namespace=kube-system

Create deployment

Create a deployment.yaml and replace environment variables with your settings. Available configuration options:

  • POLL - removing this environment variable will disable poll support.
  • PUBSUB and PROJECT_ID - environment variables to enable automated integration with Google Container Registry. Set PROJECT_ID to your google cloud project ID.
  • WEBHOOK_ENDPOINT - provide an endpoint where Keel should send notifications.
  • SLACK_TOKEN - provide Slack token where Keel should send notifications, more info on getting token in the docs.
  • HELM_PROVIDER - enable Helm provider.
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata: 
  annotations:
    kubernetes.io/service-account.name: keel
  name: keel
  namespace: kube-system
  labels: 
      name: "keel"
spec:
  replicas: 1
  template:
    metadata:
      name: keel
      labels:
        app: keel      
    spec:
      containers:                    
        - image: karolisr/keel:0.4.0
          imagePullPolicy: Always
          env:          
            - name: POLL
              value: "1"               
            - name: PUBSUB
              value: "1"            
            - name: PROJECT_ID
              value: "my-project-id"
            # Enable/disable Helm provider  
            # - name: HELM_PROVIDER
            #   value: "1" 
            # - name: WEBHOOK_ENDPOINT
            #   value: https://my.webhookrelay.com/v1/webhooks/2fc52b16-75f7-41f2-8e2d-81afbbcae709  
            # - name: SLACK_TOKEN
            #   value: your-token-here
            # - name: SLACK_CHANNELS
            #   value: general            
          name: keel
          command: ["/bin/keel"]
          ports:
            - containerPort: 9300       
          livenessProbe:
            httpGet:
              path: /healthz
              port: 9300
            initialDelaySeconds: 30
            timeoutSeconds: 10         

Once you are happy with env variables, create it:

kubectl create -f deployment.yaml

That’s it, to check whether it successfully started - check pods:

kubectl -n kube-system get pods

You should see something like this:

$ kubectl -n kube-system get pods
NAME                    READY     STATUS    RESTARTS   AGE
keel-2732121452-k7sjc   1/1       Running   0          14s

If you have any problems deploying or configuring Keel - raise an issue.