Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with Kubernetes, Second Edition - Second Edition

You're reading from  Getting Started with Kubernetes, Second Edition - Second Edition

Product type Book
Published in May 2017
Publisher Packt
ISBN-13 9781787283367
Pages 286 pages
Edition 2nd Edition
Languages
Author (1):
Jonathan Baier Jonathan Baier
Profile icon Jonathan Baier

Table of Contents (20) Chapters

Title Page
Credits
About the Author
Acknowledgement
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Introduction to Kubernetes 2. Pods, Services, Replication Controllers, and Labels 3. Networking, Load Balancers, and Ingress 4. Updates, Gradual Rollouts, and Autoscaling 5. Deployments, Jobs, and DaemonSets 6. Storage and Running Stateful Applications 7. Continuous Delivery 8. Monitoring and Logging 9. Cluster Federation 10. Container Security 11. Extending Kubernetes with OCP, CoreOS, and Tectonic 12. Towards Production Ready

Example set up


Before we start exploring the various capabilities built into Kubernetes for scaling and updates, we will need a new example environment. We are going to use a variation of our previous container image with a blue background (refer to the v0.1 and v0.2 (side by side) image, later in this chapter, for a comparison). We have the following code:

apiVersion: v1 
kind: ReplicationController 
metadata: 
  name: node-js-scale 
  labels: 
    name: node-js-scale 
spec: 
  replicas: 1 
  selector: 
    name: node-js-scale 
  template: 
    metadata: 
      labels: 
        name: node-js-scale 
    spec: 
      containers: 
      - name: node-js-scale 
        image: jonbaier/pod-scaling:0.1 
        ports: 
        - containerPort: 80

Listing 4-1: pod-scaling-controller.yaml

apiVersion: v1 
kind: Service 
metadata: 
  name: node-js-scale 
  labels: 
    name: node-js-scale 
spec: 
  type: LoadBalancer 
  sessionAffinity: ClientIP 
  ports: 
  - port: 80 
  selector: 
    name: node-js...
lock icon The rest of the chapter is locked
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 AU $19.99/month. Cancel anytime}