I'm running my application in AWS-EKS and my Jenkins instance is not yet containerized. To deploy our application we are using kubectl command in the Jenkins Pipeline. I'm wondering any best practice or plugin for Kubernetes deployment via Jenkins.
So far I found below plugins which do not completely work with my use-case.
https://github.com/jenkinsci/kubernetes-plugin - To run dynamic Jenkins agents. May not be suitable for my case.
https://github.com/jenkinsci/kubernetes-cd-plugin - This plugin is providing the K8s Deployment functionality, but interacting with EKS is a bit of concern with this plugin as in EKS authentication is done by aws-iam-authenticator
Is there any plugin available in Jenkins to handle Kubernetes deployment?
Any pointers would be helpful.
Note : This question was already asked couple of years ago, but did not get any proper answers. So just wanted to repost.
According to this issue the second plugin you've mentioned is not compatible with aws-iam-authenticator and efforts to do so have not been met with response from maintainers.
The first plugin will probably require to use the same kubectl
flow you are using today, and will only simplify authenticating to your clusters, so I agree it's not the best fit to what you are trying to do.
I haven't used this tool myself, but from what I hear the most common tool for deploying code to kubernetes with Jenkins should be JenkinsX, I would look into that if I were you.