Deploying OpenWhisk on IBM Cloud Kubernetes Service (IKS)


IBM provides both a “Lite” and a “Standard” Kubernetes offering in its public cloud Kubernetes service (IKS). These differ in capabilities, so they are described separately below.

Initial setup

Creating the Kubernetes Cluster

Follow IBM's instructions to provision your cluster.

Configuring OpenWhisk

IBM Cloud Standard cluster

An IBM Cloud Standard cluster has full support for TLS including a wild-card certificate for subdomains and can be configured with additional annotations to fine tune ingress performance.

First, determine the values for and for your cluster by running the command:

ibmcloud cs cluster get -c <mycluster>

The CLI output will look something like

ibmcloud cs cluster get -c <mycluster>
Retrieving cluster <mycluster>...
Name:    <mycluster>
Ingress Subdomain:  <domain>
Ingress Secret:     <ibmtlssecret>

As described in IBM's ingress documentation, to enable applications deployed in multiple namespaces to share the ingress resource, you should use a unique subdomain name for each namespace. We suggest a convention of using the namespace name as the subdomain name. So if you are deploying openwhisk into the openwhisk namespace, use openwhisk as your subdomain (as shown below in the example mycluster.yaml).

A template [mycluster.yaml](../deploy/ibm-public/mycluster-iks.yaml] for a standard deployment of OpenWhisk on IKS would be:

    # NOTE: Replace <domain> with your cluster's actual domain
    apiHostName: openwhisk.<domain>
    apiHostPort: 443
    apiHostProto: https
    type: Standard
    useInternally: true
    # NOTE: Replace <domain> with your cluster's actual domain
    domain: openwhisk.<domain>
      enabled: true
      secretenabled: true
      createsecret: false
      # NOTE: Replace <ibmtlssecret> with your cluster's actual tlssecret
      secretname: <ibmtlssecret>
    annotations: public-iks-k8s-nginx "true" |
         proxy_set_header X-Request-ID $request_id; 50m "75"

    impl: kubernetes

The underlying container runtime used by IKS is containerd. Therefore, you cannot use the DockerContainerFactory on IKS and must use the KubernetesContainerFactory.

IBM Cloud Lite cluster

The only available ingress method for an IBM Cloud Lite cluster is to use a NodePort. Obtain the Public IP address of the sole worker node by using the command

ibmcloud cs workers <my-cluster>

Then define mycluster.yaml as

    type: NodePort
    apiHostPort: 31001
    useInternally: true

  httpsNodePort: 31001

# disable affinity
  enabled: false
  enabled: false
  options: "-Dwhisk.kubernetes.user-pod-node-affinity.enabled=false"
  # must use KCF as IKS uses containerd as its container runtime
    impl: "kubernetes"

Hints and Tips

On IBM Standard clusters, you can configure OpenWhisk to integrate with platform logging and monitoring services following the general instructions for enabling these services for pods deployed on Kubernetes.


Using an IBM Cloud Lite cluster is only appropriate for development and testing purposes. It is not recommended for production deployments of OpenWhisk.

When using an IBM Cloud Lite cluster, TLS termination will be handled by OpenWhisk's nginx service and will use self-signed certificates. You will need to invoke wsk with the -i command line argument to bypass certificate checking.