You can find a sample repo for deploying to any Kubernetes instance with CloudBees CodeShip Pro on Github.
To make it easy for you to deploy your application to AWS EKS, which is a managed Kubernetes cluster service on AWS, we’ve built a container to make authenticating with a remote Kubernetes cluster and using the
kubectl CLI easy.
CloudBees CodeShip Pro uses a Kubernetes deployment container that we maintain to authenticate with your remote Kubernetes cluster, including your EKS cluster.
Please review our Kubernetes documentation to learn how to set up and use this authentication container.
It is also advised that you review AWS’ IAM documentation to find the correct policies for your AWS user.
The first thing you will need to do is to define your Kubernetes deployment service, using the CodeShip Kubernetes deployment container((https://github.com/CodeShip-library/kubectl-connection-demo). You will add the following to your codeship-services.yml file:
In this example, we will run them via a script named kubernetes.sh (such a script would be run from the container via Docker volumes:
- name: deploy
Inside this kubernetes.sh script, we can include any Kubernetes commands we like. As one example:
#!/bin/sh kubectl apply -f ./deployment.yaml
From here, you can modify your EKS deployments to run any command you’d like in any context by inserting any commands, tags or behaviors you need.