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

Error for .kube directory already existent with DeploymentAction #5374

Closed
kprakashcontender opened this issue Aug 17, 2020 · 5 comments · Fixed by #5389
Closed

Error for .kube directory already existent with DeploymentAction #5374

kprakashcontender opened this issue Aug 17, 2020 · 5 comments · Fixed by #5389
Assignees

Comments

@kprakashcontender
Copy link

Hello Team,

I have a job configured with Deployment Action and the Kubernetes Integration on the project is configured with the Deployment File correctly. I am deploying a sample Flask Application, and the Pipeline Job Configuration has the below steps.

image

When the Workflow Runs, the following error is displayed.
[INFO] Starting step "DeployApplication"
[INFO] # Plugin Kubernetes Deployment Plugin v0.47.0+cds.13856 is ready
[INFO] Cannot create directory .kube : mkdir .kube: file exists
[INFO] # Details: Cannot create directory .kube : mkdir .kube: file exists
[INFO] # Status: Fail
[INFO] Stopping plugin...
[INFO] End of step "DeployApplication" (3s)

I have tried to locate the ".kube" and it is only found in three places as below.

image

I don't see a reason why this is a problem, as when I a manually apply the Deployment file using "kubectl apply -f it works absolutely fine. Any help on this would be very useful. Thanks.

@yesnault
Copy link
Member

Hi @kprakashcontender ,
The plugin-kubernetes tries to create the .kube directory into the current root workspace: {{.cds.workspace}}. This workspace is delete after the end of the job.
Can you add a step script above the DeployApplication, with a ls -la command to check if the .kube is really here or not?
The {{.cds.workspace}}/.kube directory is deleted after the step DeployApplication.

@yesnault yesnault self-assigned this Aug 17, 2020
@kprakashcontender
Copy link
Author

Hi, @yesnault As you've suspected there is a ".kube" directory in the current workspace.

image

@yesnault
Copy link
Member

ok, so the plugin needs :

  • to delete the .kube directory
  • OR mv it into another name during plugin execution
  • OR no update -> display that the .kube exist as today

@kprakashcontender
Copy link
Author

So, do you suspect that this could be a bug with the plugin. If yes, what would be your advice as a temporary fix?

@yesnault
Copy link
Member

@kprakashcontender the temporary workaround is to delete .kube directory in the action script before.

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

Successfully merging a pull request may close this issue.

2 participants