Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Kubernetes on Azure

You're reading from  Hands-On Kubernetes on Azure

Product type Book
Published in Mar 2019
Publisher Packt
ISBN-13 9781789536102
Pages 258 pages
Edition 1st Edition
Languages
Authors (2):
Shivakumar Gopalakrishnan Shivakumar Gopalakrishnan
Profile icon Shivakumar Gopalakrishnan
Gunther Lenz Gunther Lenz
Profile icon Gunther Lenz
View More author details

Table of Contents (16) Chapters

Preface 1. Section 1: The Basics
2. Introduction to Docker and Kubernetes 3. Kubernetes on Azure (AKS) 4. Section 2: Deploying on AKS
5. Application Deployment on AKS 6. Scaling Your Application to Thousands of Deployments 7. Single Sign-On with Azure AD 8. Monitoring the AKS Cluster and the Application 9. Operation and Maintenance of AKS Applications 10. Section 3: Leveraging Advanced Azure PaaS Services in Combination with AKS
11. Connecting an App to an Azure Database - Authorization 12. Connecting to Other Azure Services (Event Hub) 13. Securing AKS Network Connections 14. Serverless Functions 15. Other Books You May Enjoy

Securing AKS Network Connections

Loose lips sink ships is a phrase that describes how easy it can be to jeopardize the security of a Kubernetes-managed cluster (Kubernetes, by the way, is Greek for helmsman of a ship). If your cluster is left open with the wrong ports or services exposed, or plain text is used for secrets in application definitions, bad actors can take advantage of this lax security and do pretty much whatever they want in your cluster.

In this chapter, we will explore Kubernetes secrets in more depth. You will learn about different secrets backends and how to use them. You'll get a brief introduction to service mesh concepts, and you'll be able to follow along with a practical example.

The following topics will be covered briefly in this chapter:

  • SSH secrets management
  • The Istio service mesh at your service
...

Technical requirements

You will require a modern browser, such as Chrome, Firefox, or Edge, for this chapter.

Setting up secrets management

All production applications require some secret information to function. Kubernetes has a pluggable secrets backend to manage these secrets. Kubernetes also provides multiple ways of using the secrets in your deployment. The ability to manage secrets and properly use the secrets backend will make your services resistant to attacks.

We have used secrets in all our deployments in previous chapters. Mostly, we passed the secrets as a string in some kind of variable, or Helm took care of creating the secrets for us. In Kubernetes, secrets are a resource just like pods and replica sets. There are no cluster-wide secrets, which can cause a number of long debugging sessions. Secrets have to be (re)created in all the namespaces where you want to use them. In this section, we'll learn how to create, decode, and use our own secrets.

...

The Istio service mesh at your service

We have found a number of ways to secure our pods, but our network connections are still open. Any pod in the cluster can talk to any other pod in the same cluster. As a site reliability engineer, you will want to enforce both ingress and egress rules. As a developer, you don't want to be bothered by it as you won't have information on where your application will be deployed, as well as what is allowed and what is not. If only there was a way that we could run the applications as is, while still specifying network policies.

Enter service mesh—this is defined as the layer that controls service-to-service communication. Just as with microservices, service mesh implementation is not a free lunch. If you don't have hundreds of microservices running, you probably don't need a service mesh. If you decide that you really...

Summary

In this chapter, we learned how to secure secrets in Kubernetes. We went into detail in creating, decoding, and using secrets. We installed and injected Istio, achieving the goal of being able to set system-wide policies without needing developer intervention or oversight. Since hackers like to pick on easy systems, the skills that we have learned in this chapter will help to make your setup less likely to be targeted. In the next chapter, you will learn how to deploy serverless functions on AKS.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Hands-On Kubernetes on Azure
Published in: Mar 2019 Publisher: Packt ISBN-13: 9781789536102
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.
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}