Kubernetes Specifications Troubleshooting

Rajesh PetheRajesh Pethe
1 min read

This is part eight of a series of lab tasks from KodeKloud for Kubernetes. Master blog listing all parts can be seen here. Make sure to follow setup instructions for minikube on your PC.

Task

One of the Nautilus DevOps team members was working on to update an existing Kubernetes template. Somehow, he made some mistakes in the template and it is failing while applying. We need to fix this as soon as possible, so take a look into it and make sure you are able to apply it without any issues. Also, do not remove any component from the template like pods/deployments/volumes etc.

/home/thor/mysql_deployment.yml is the template that needs to be fixed.

Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.

Solution

Simple fix to this problem is getting the mysql_deployment.yml and fixing the YAML as needed. Kubernetes JSON Schema is defined here and can be used with IDE to highlight problems in YAML spec. Something like...

Original/problematic YAML can be found here with comments describing what's wrong with the spec.

Final solution with all fixes can be found here. It just needs to be applied.

0
Subscribe to my newsletter

Read articles from Rajesh Pethe directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Rajesh Pethe
Rajesh Pethe

I’m a hands-on software engineer with over 18 years of experience solving real-world problems with code. I’ve spent most of that time building web applications, backend systems, and automation tools — often using Python, Django, REST, and a healthy mix of SQL and shell scripts on Linux. Along the way, I’ve also picked up frontend work with Angular and React, and built infrastructure using Docker, Kubernetes, AWS, and Terraform. I wouldn’t call myself a DevOps engineer, but I do believe in owning the full stack — from writing the API to making sure it runs smoothly in production. I’ve worked in all kinds of teams — large, small, remote, distributed, fast-paced, slow-paced. For the last few years, I’ve been freelancing, which has been both freeing and demanding in the best possible way. It’s pushed me to keep learning, stay sharp, and step outside my comfort zone. I love the mix of flexibility and challenge it brings.