https://pulumi.com logo
#kubernetes
Title
# kubernetes
m

microscopic-arm-19649

08/10/2020, 7:21 PM
Hey, I don't know if is my mistake or a bug. But when I am creating a presistent volume Claim using pulumi , the command pulumi up get stuck in the creation of the presistentvolume claim. I double check with kubectl and the PVC is in state pending but that it is because I don't have pod for that PVC. I think the PVC config is correct because i am converting yaml manifests to pulumi code
b

billowy-army-68599

08/10/2020, 7:54 PM
if you describe the pvc, it should tell you why it's pending
m

microscopic-arm-19649

08/10/2020, 10:48 PM
PVC defined in the pulumi TS
The same PVC defined in yaml
The event I have from Kubernetes clusters
Copy code
Normal  WaitForFirstConsumer  9s (x6 over 74s)  persistentvolume-controller  waiting for first consumer to be created before binding
b

billowy-army-68599

08/10/2020, 11:06 PM
@microscopic-arm-19649 are you in AWS?
m

microscopic-arm-19649

08/10/2020, 11:08 PM
Yes, the Kubernetes cluster I am using is the EKS. The full flow I have is to create pvc, create the deployment then create the service . funny if I comment the part to create the service it work and try only to create the pvc and deployment it works
b

billowy-army-68599

08/10/2020, 11:09 PM
do you have EKS worker nodes in all AZs? wait for first consumer indicates that the persistent volume was created (you can double check by by doing
kubectl get pv
which should show am EBS volume that's created
I've seen this before when all your worker nodes are in availability zone 1, but your ebs volume was created in az 2
m

microscopic-arm-19649

08/10/2020, 11:12 PM
Umm, I am not sure that could be the case, because if I comment some parts of the pulumi code it works This is my current plan
Copy code
Previewing update (dev):
     Type                                      Name             Plan       
     pulumi:pulumi:Stack                       aws-k8s-poc-dev             
 +   ├─ kubernetes:core:Service                mongodb          create     
 +   ├─ kubernetes:core:PersistentVolumeClaim  mongodb-data     create     
 +   └─ kubernetes:apps:Deployment             mongodb          create
b

billowy-army-68599

08/10/2020, 11:14 PM
which parts are you commenting out to make it work?
m

microscopic-arm-19649

08/10/2020, 11:15 PM
And when I apply the changes the pulumi is strating to create the pvc and the service, but because it depends of Deployment looks to fail
Copy code
Updating (dev):
     Type                                      Name             Status       Info
     pulumi:pulumi:Stack                       aws-k8s-poc-dev  running.     
 +   ├─ kubernetes:core:Service                mongodb          creating.    [1/3] Finding Pods to di
 +   └─ kubernetes:core:PersistentVolumeClaim  mongodb-data     creating.
As you can see in this output, pulumi is not trying to create the deployment resource
b

billowy-army-68599

08/10/2020, 11:16 PM
can you share your code in a github gist?
So in this gist you can see the order is create pvc, create deployment, create service
but if i change the order to create pvc, create service and create deployment looks to work?
Does the order matter?
b

billowy-army-68599

08/10/2020, 11:31 PM
I'm trying this out, just waiting for the eks cluster to spin up 🙂
it shouldn't matter about the order in theory, interesting that changing it works
m

microscopic-arm-19649

08/10/2020, 11:36 PM
I also doing some try outs, does pulumin have a limit number of workers? I am running now with verbose level 5
pulumi up --logtostderr -v=5
b

billowy-army-68599

08/10/2020, 11:36 PM
okay I can repro this, it's definitely a bug
m

microscopic-arm-19649

08/10/2020, 11:36 PM
Looks again to be stuck in the creation of the Service and PVC but not trying to create the deployment
Should I open a bug report in github?
b

billowy-army-68599

08/10/2020, 11:39 PM
yes please, link it here and I'll confirm it exists, you should be able to work around this by settings
dependsOn
on the resource, but you shouldn't have to
m

microscopic-arm-19649

08/10/2020, 11:52 PM
b

billowy-army-68599

08/10/2020, 11:58 PM
@microscopic-arm-19649 I'm going to move this to the pulumi-kubvernetes repo
👍 1
3 Views