Skip to Main Content
Hands-On Microservices with Spring Boot and Spring Cloud
book

Hands-On Microservices with Spring Boot and Spring Cloud

by Magnus Larsson
September 2019
Intermediate to advanced content levelIntermediate to advanced
668 pages
15h 59m
English
Packt Publishing
Content preview from Hands-On Microservices with Spring Boot and Spring Cloud

Trying out a sample deployment

Let's see how we can do the following:

  • Deploy a simple web server based on NGINX in our Kubernetes cluster.
  • Apply some changes to the deployment:
    • Delete a pod and verify that the ReplicaSet creates a new one.
    • Scale the web server to three pods to verify that the ReplicaSet fills the gap.
  • Route external traffic to it using a service with a node port.

First, create a namespace, first-attempts, and update the kubectl context to use this namespace by default:

kubectl create namespace first-attemptskubectl config set-context $(kubectl config current-context) --namespace=first-attempts

We can now create a deployment of NGINX in the namespace using the kubernetes/first-attempts/nginx-deployment.yaml file. This ...

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

Microservices with Spring Boot and Spring Cloud - Second Edition

Microservices with Spring Boot and Spring Cloud - Second Edition

Magnus Larsson

Publisher Resources

ISBN: 9781789613476Supplemental Content