Reader small image

You're reading from  Kubernetes for Developers

Product typeBook
Published inApr 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788834759
Edition1st Edition
Languages
Right arrow
Author (1)
Joseph Heck
Joseph Heck
author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck

Right arrow

Chapter 10. Troubleshooting Common Problems and Next Steps

The previous chapters have explored how to use Kubernetes in your development process. In this chapter, we wrap up the examples by looking at some of the common errors you might encounter. We look at how to understand them, and techniques for diagnosing the issues as well as how to resolve them. This chapter also reviews some of the emerging projects that are forming to assist developers with using Kubernetes. 

Topics for this chapter include:

  • Common errors and how to resolve them
  • Emerging projects for developers
  • Interacting with the Kubernetes project

Common errors and how to resolve them


Throughout the book, we have provided examples that illustrate how to work with Kubernetes. In developing these examples, we hit all the same issues you are likely to encounter, some of them confusing—and it isn't always clear how to determine what the problem is and how to resolve it so that the system works. This section will go through a number of the errors that you might see, discuss how to diagnose them, and provide you with some techniques to help you understand if you see these same issues yourself.

Error validating data

When you are writing your own manifests for Kubernetes and using them directly, it is very easy to make simple mistakes that result in the error message : error validating ....

These are fortunately very easy to understand, if terribly inconvenient. To illustrate this example, I created a slightly broken deployment manifest:

When running kubectl apply with this manifest, you will receive an error:

error: error validating "test.yml...

Emerging projects for developers


Looking at alternatives to help the development process that uses Kubernetes starts to expose a large number of projects in development. While writing this book, Kubernetes advanced from version 1.7 to the beta release of Kubernetes v1.10. At the same time, a large number of projects have started to establish themselves around Kubernetes, working to help smooth some of the rough edges around using Kubernetes actively in a development workflow.

Linters

In the previous section, we were talking about missing components that can't be pre-validated by Kubernetes, but which we can look for ourselves. Three projects that are related to validation are kubeval, kube-lint, and kubetest, described here:

kubeval was created by Gareth Rushgrove to validate manifests and configuration files before attempting to apply them. This tool can be extremely handy in double-checking your work when you're creating manifests from your own...

Interacting with the Kubernetes project


In discussing all these projects, the one where you can get the most information about how to work with Kubernetes is Kubernetes itself. The project hosts a website that includes the formal documentation, a blog, a community calendar, tutorials, and more at https://kubernetes.io/:

This site makes a great jumping off point to get more information, but certainly isn't the only resource available.

The Kubernetes project is really quite large, so large that it is nearly impossible for any single person to track all of the efforts, evolution, projects, and interests that are going on within the project. To attempt to provide guidance, the Kubernetes project has set itself up with a number of groups to focus on these interests in the form of Special Interest Groups, or SIGs. These groups are the semi-formal subprojects of Kubernetes, and each focuses on some specific subset of Kubernetes. Not surprisingly, many of these SIGs overlap in specifics, and it is...

Summary


In this chapter, we touched on some of the problems that you may run into when developing and deploying to Kubernetes, and then touched on a number of projects that may be of interest to help you or your team speed up their development process while also taking advantage of Kubernetes. The final portion of this chapter discussed the Kubernetes project itself, how you can interact with it, and where to find more information to leverage this amazing set of tools.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Kubernetes for Developers
Published in: Apr 2018Publisher: PacktISBN-13: 9781788834759
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck