Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Kubernetes Security

You're reading from   Learning Kubernetes Security A practical guide for secure and scalable containerized environments

Arrow left icon
Product type Paperback
Published in Jun 2025
Publisher Packt
ISBN-13 9781835886380
Length 390 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Raul Lapaz Raul Lapaz
Author Profile Icon Raul Lapaz
Raul Lapaz
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Kubernetes Architecture FREE CHAPTER 2. Kubernetes Networking 3. Threat Modeling 4. Applying the Principle of Least Privilege in Kubernetes 5. Configuring Kubernetes Security Boundaries 6. Securing Cluster Components 7. Authentication, Authorization, and Admission Control 8. Securing Pods 9. Shift Left (Scanning, SBOM, and CI/CD) 10. Real-Time Monitoring and Observability 11. Security Monitoring and Log Analysis 12. Defense in Depth 13. Kubernetes Vulnerabilities and Container Escapes 14. Third-Party Plugins for Securing Kubernetes 15. Other Books You May Enjoy 16. Index Appendix: Enhancements in Kubernetes 1.30–1.33

Introducing the Kubernetes service

Kubernetes Deployments create and destroy Pods dynamically. For a general three-tier web architecture, this can be a problem if the frontend and backend are different Pods. Frontend Pods don’t know how to connect to the backend. Network service abstraction in Kubernetes resolves this problem.

The Kubernetes service enables network access for a logical set of Pods. The logical set of Pods is usually defined using labels. When a network request is made for a service, it selects all the Pods with a given label and forwards the network request to one of the selected Pods.

A Kubernetes service is defined using a YAML Ain’t Markup Language (YAML) file, as follows:

apiVersion: v1
kind: Service
metadata:
  name: service-1
spec:
  type: NodePort
  selector:
    app: app-1
  ports:
    - nodePort: 32766
      protocol: TCP
      port: 80
      targetPort: 9376

In this YAML file, the following applies:

  • The type property...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Kubernetes Security
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 $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon