<p>I am new to Kubernetes, and trying to get apache airflow working using helm charts. After almost a week of struggling, I am nowhere - even to get the one provided in the apache airflow documentation working. I use Pop OS 20.04 and microk8s.</p>
<p>When I run these commands:</p>
<pre><code>kubectl create namespace airflow
helm repo add apache-airflow https://airflow.apache.org
helm install airflow apache-airflow/airflow --namespace airflow
</code></pre>
<p>The helm installation times out after five minutes.</p>
<pre><code>kubectl get pods -n airflow
</code></pre>
<p>shows this list:</p>
<pre><code>NAME                                   READY   STATUS     RESTARTS   AGE
airflow-postgresql-0                   0/1     Pending    0          4m8s
airflow-redis-0                        0/1     Pending    0          4m8s
airflow-worker-0                       0/2     Pending    0          4m8s
airflow-scheduler-565d8587fd-vm8h7     0/2     Init:0/1   0          4m8s
airflow-triggerer-7f4477dcb6-nlhg8     0/1     Init:0/1   0          4m8s
airflow-webserver-684c5d94d9-qhhv2     0/1     Init:0/1   0          4m8s
airflow-run-airflow-migrations-rzm59   1/1     Running    0          4m8s
airflow-statsd-84f4f9898-sltw9         1/1     Running    0          4m8s
airflow-flower-7c87f95f46-qqqqx        0/1     Running    4          4m8s
</code></pre>
<p>Then when I run the below command:</p>
<pre><code>kubectl describe pod airflow-postgresql-0 -n airflow
</code></pre>
<p>I get the below (trimmed up to the events):</p>
<pre><code>Events:
  Type     Reason            Age                From               Message
  ----     ------            ----               ----               -------
  Warning  FailedScheduling  58s (x2 over 58s)  default-scheduler  0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims.
</code></pre>
<p>Then I deleted the namespace using the following commands</p>
<pre><code>kubectl delete ns airflow
</code></pre>
<p>At this point, the termination of the pods gets stuck. Then I bring up the proxy in another terminal:</p>
<pre><code>kubectl proxy
</code></pre>
<p>Then issue the following command to force deleting the namespace and all it's pods and resources:</p>
<pre><code>kubectl get ns airflow -o json | jq '.spec.finalizers=[]' | curl -X PUT http://localhost:8001/api/v1/namespaces/airflow/finalize -H &quot;Content-Type: application/json&quot; --data @-
</code></pre>
<p>Then I deleted the PVC's using the following command:</p>
<pre><code>kubectl delete pvc --force --grace-period=0 --all -n airflow
</code></pre>
<p>You get stuck again, so I had to issue another command to force this deletion:</p>
<pre><code>kubectl patch pvc data-airflow-postgresql-0 -p '{&quot;metadata&quot;:{&quot;finalizers&quot;:null}}' -n airflow
</code></pre>
<p>The PVC's gets terminated at this point and these two commands return nothing:</p>
<pre><code>kubectl get pvc -n airflow
kubectl get all -n airflow
</code></pre>
<p>Then I restarted the machine and executed the helm install again (using first and last commands in the first section of this question), but the same result.</p>
<p>I executed the following command then (using the suggestions I found here):</p>
<pre><code>kubectl describe pvc -n airflow
</code></pre>
<p>I got the following output (I am posting the event portion of PostgreSQL):</p>
<pre><code>Type    Reason         Age                   From                         Message
  ----    ------         ----                  ----                         -------
  Normal  FailedBinding  2m58s (x42 over 13m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set
</code></pre>
<p>So my assumption is that I need to provide storage class as part of the values.yaml</p>
<p>Is my understanding right? How do I provide the required (and what values) in the values.yaml?</p>

<p>If you installed with helm, you can uninstall with <code>helm delete airflow -n airflow</code>.</p>
<p>Here's a way to install airflow for <strong>testing</strong> purposes using default values:</p>
<p>Generate the manifest <code>helm template airflow apache-airflow/airflow -n airflow &gt; airflow.yaml</code></p>
<p>Open the &quot;airflow.yaml&quot; with your favorite editor, replace all &quot;volumeClaimTemplates&quot; with emptyDir. Example:</p>
<p><a href="https://i.stack.imgur.com/klKsT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/klKsT.png" alt="enter image description here" /></a></p>
<p>Create the namespace and install:</p>
<pre><code>kubectl create namespace airflow
kubectl apply -f airflow.yaml --namespace airflow
</code></pre>
<p><a href="https://i.stack.imgur.com/VqyEd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VqyEd.png" alt="enter image description here" /></a></p>
<p>You can <a href="https://stackoverflow.com/a/70163535/14704799">copy</a> files out from the pods if needed.</p>
<p>To delete <code>kubectl delete -f airflow.yaml --namespace airflow</code>.</p>
