Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes pod status doesn't reflect Fargate task status #17

Open
Jeffwan opened this issue Jan 25, 2021 · 1 comment
Open

Kubernetes pod status doesn't reflect Fargate task status #17

Jeffwan opened this issue Jan 25, 2021 · 1 comment

Comments

@Jeffwan
Copy link
Contributor

Jeffwan commented Jan 25, 2021

After I schedule two pods, pod status is changed to pending which is expected and after that, they were changed to ProviderFailed

➜ k get pods
NAME                                READY   STATUS    RESTARTS   AGE
nginx-deployment-568c9ff59d-hzj2z   0/1     Pending   0          3s
nginx-deployment-568c9ff59d-z5zdz   0/1     Pending   0          3s

➜ k get pods
NAME                                READY   STATUS           RESTARTS   AGE
nginx-deployment-568c9ff59d-hzj2z   0/1     ProviderFailed   0          7s
nginx-deployment-568c9ff59d-z5zdz   0/1     ProviderFailed   0          7s

The major reason is UpdatePod is not implemented.

aws-fargate/provider.go

Lines 129 to 132 in 3508966

func (p *FargateProvider) UpdatePod(ctx context.Context, pod *corev1.Pod) error {
log.Printf("Received UpdatePod request for %s/%s.\n", pod.Namespace, pod.Name)
return errNotImplemented
}

2021/01/24 16:28:27 Received GetPod request for default/nginx-deployment-568c9ff59d-hzj2z.
2021/01/24 16:28:27 Received GetPod request for default/nginx-deployment-568c9ff59d-z5zdz.
2021/01/24 16:28:27 Received UpdatePod request for default/nginx-deployment-568c9ff59d-hzj2z.
INFO[0074] Updated k8s pod status                        key=default/nginx-deployment-568c9ff59d-hzj2z method=createOrUpdatePod name=nginx-deployment-568c9ff59d-hzj2z namespace=default node=virtual-kubelet operatingSystem=Linux phase=Pending pod=nginx-deployment-568c9ff59d-hzj2z podPhase=Pending provider=aws reason=ProviderFailed uid=3c426899-01ed-41a0-85e0-f59071edb52f watchedNamespace= workerId=10
WARN[0074] requeuing [["default/nginx-deployment-568c9ff59d-hzj2z"]] due to failed sync  error="failed to sync pod \"default/nginx-deployment-568c9ff59d-hzj2z\" in the provider: not implemented by Fargate provider" key=default/nginx-deployment-568c9ff59d-hzj2z method=handleQueueItem node=virtual-kubelet operatingSystem=Linux provider=aws watchedNamespace= workerId=10

The status is not updated to Running even after Fargate task is ready.

image

Pod status needs to be fixed to reflect real Fargate task status.

@Jeffwan Jeffwan changed the title Kubernetes pod status is not correct Kubernetes pod status doesn't reflect Fargate task status Jan 25, 2021
@TomaszKlosinski
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants