Welcome to the 9Spokes DevSecOps technical challenge! We value and appreciate the diversity and uniqueness of thought in each individual. It is our intent is to learn more about you via the code you write and your approach to solving problems.
This repo contains the instructions and the data you need to complete the 9Spokes DevSecOps Challenge. This challenge is not intended to be complex, but it is an opportunity for you to showcase your understanding and applying of good infrastructure & basic development practices. We strongly value the Infrastructure as Code approach to managing Cloud resources, hence we encourage you to think about the repeatability of your exercise using a config-driven approach to infrastructure.
You are encouraged to treat this as a real-life project. This typically means:
- Use version control effectively
- Include some basic documentation if applicable
- Use a proper naming convention that suits you
Once you are done, please share your work by submitting a public link to your repository. Include any special notes or running instructions in a README.md file of your choice.
Try not to exceed 2-3 hours on this exercise.
This repo contains a sample hello world application written in Go in the hello/
directory. The first phase of this challenge is to build this application into a Docker container using the supplied Dockerfile
. You will need to push the resulting image to a Docker registry of your choice. The image will be used in subsequent steps.
- Create a Kubernetes cluster using any method you'd like (e.g.
kops
,minikube
,microk8s
or Cloud) - Create a new
namespace
calledstaging
.
- Create a new
pod
calledhello
in thisstaging
namespace, make sure it is in a healthy state. Use thehello
image from the step above for this task.
- Assume you are operating a 3 node (
node-1
,node-2
, andnode-3
) cluster, deploy apod
calledp2
in everynode
of your cluster.
- Create a new
pod
calledp3
in thestaging
namespace. Thispod
contains two containers and thepod
only should be created when one of these two containers has a file called/app/ready.txt
. Thepod
should fail if that container does not have that file.
- Deploy prometheus alert manager and grafana into the
kube-system
namespace and configure customised alerts called9spokes-cpu-alert
which is only going to be trigger when apod
has 80% of the CPU running for 60 seconds. You should send the details of this alert with your name into Microsoft Teams Channel located here. - Deploy an
ingress
controller to protect prometheus and alert manager using any authentication method you'd like.
Thank you and good luck!