apache / openwhisk-deploy-kube

The Apache OpenWhisk Kubernetes Deployment repository supports deploying the Apache OpenWhisk system on Kubernetes and OpenShift clusters.
https://openwhisk.apache.org/
Apache License 2.0
296 stars 228 forks source link

Failed to deploy on k8s because of PersistentVolume #734

Closed lyudmilalala closed 1 year ago

lyudmilalala commented 1 year ago

I am trying to deploy Openwhisk on

  1. Windows Docker Desktop k8s
  2. A self-built k8s cluster on Virtualbox VM (1 master 1 worker)

but failed with the same issue.

My Environment

Windows Docker Desktop k8s docker desktop version 4.3.0 docker version 20.10 k8s version 1.22.4 helm version 3.4.2

Self-built k8s cluster two Ubuntu 22.04 Virtualbox VM docker desktop version 4.3.0 docker version 20.10 k8s version 1.21.14 helm version 3.4.2

My steps

Main follows Deploying from Git part of the README

  1. git clone https://github.com/apache/openwhisk-deploy-kube.git
  2. Create a mycluster.yaml as below in the openwhisk-deploy-kube folder
    
    whisk:
    ingress:
    type: NodePort
    apiHostName: localhost
    apiHostPort: 31001
    useInternally: false

nginx: httpsNodePort: 31001

try to disable presistence

k8s: persistence: enabled: false

A single node cluster; so disable affinity

affinity: enabled: false toleration: enabled: false invoker: options: "-Dwhisk.kubernetes.user-pod-node-affinity.enabled=false"

3. In the `openwhisk-deploy-kube` folder, run `helm install owdev ./helm/openwhisk -n openwhisk --create-namespace -f mycluster.yaml`

### My problem
The Kafka and Redis pods keep `Pending` with event log as below:

Type Reason Age From Message


Warning FailedScheduling 40s (x9 over 6m17s) default-scheduler 0/2 nodes are available: 2 pod has unbound immediate PersistentVolumeClaims.


even after I disabled persistence in `mycluster.yaml` according to [Kafka, Redis, CouchDB, and Zookeeper pods stuck in Pending in here](https://github.com/apache/openwhisk-deploy-kube/blob/952fb0df07949dda32d9c5de76efcbf73671cb0c/docs/troubleshooting.md) and then [Persistence in here](https://github.com/apache/openwhisk-deploy-kube/blob/952fb0df07949dda32d9c5de76efcbf73671cb0c/docs/configurationChoices.md), but it does not work.
lyudmilalala commented 1 year ago

I don't think it is related, but after I changed the apiHostName in mycluster.yaml from localhost to the InternalIP of my docker desktop k8s node to solve some other api server problems, this issue does not occur again.

To find the InternalIP of docker desktop k8s node, run kubectl describe node docker-desktop and find something as below:

Addresses:
  InternalIP:  192.168.65.4
  Hostname:    docker-desktop