Skip to Content
Hands-On Microservices with Kubernetes
book

Hands-On Microservices with Kubernetes

by Gigi Sayfan
July 2019
Intermediate to advanced
502 pages
14h
English
Packt Publishing
Content preview from Hands-On Microservices with Kubernetes

Stopping a local service

Stopping a service is as simple as calling the Done() method of the context. It can be used to signal completion to any code that uses contexts:

func StopService(ctx context.Context) { ctx.Done() }

As you can see, there is a lot of work involved in running Delinkcious, or even just a few parts of Delinkcious locally without the help of Kubernetes. When Delinkcious is running, it's great for debugging and troubleshooting, but creating and maintaining this setup is tedious and error-prone.

Also, even if all the integration tests work, they don't fully replicate the Kubernetes cluster, and there may be many failure modes that are not captured. Let's see how we can do local testing with Kubernetes itself.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kubernetes Microservices

Kubernetes Microservices

Richard Chesterwood
Cloud Native DevOps with Kubernetes

Cloud Native DevOps with Kubernetes

John Arundel, Justin Domingus
Microservices: Up and Running

Microservices: Up and Running

Ronnie Mitra, Irakli Nadareishvili

Publisher Resources

ISBN: 9781789805468Supplemental Content