Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Effortless Cloud-Native App Development Using Skaffold
Effortless Cloud-Native App Development Using Skaffold

Effortless Cloud-Native App Development Using Skaffold: Simplify the development and deployment of cloud-native Spring Boot applications on Kubernetes with Skaffold

Arrow left icon
Profile Icon Choudhary
Arrow right icon
zł39.99 zł125.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7 (14 Ratings)
eBook Oct 2021 272 pages 1st Edition
eBook
zł39.99 zł125.99
Paperback
zł157.99
Subscription
Free Trial
Arrow left icon
Profile Icon Choudhary
Arrow right icon
zł39.99 zł125.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7 (14 Ratings)
eBook Oct 2021 272 pages 1st Edition
eBook
zł39.99 zł125.99
Paperback
zł157.99
Subscription
Free Trial
eBook
zł39.99 zł125.99
Paperback
zł157.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Effortless Cloud-Native App Development Using Skaffold

Chapter 1: Code, Build, Test, and Repeat – The Application Development Inner Loop

Building and deploying cloud-native applications can be cumbersome for local and remote development if you are not using the appropriate tools. Developers go through a lot of pain to automate the build, push, and deploy steps. In this book, we will introduce you to Skaffold, which helps automate these development workflow steps. You will learn how to use the Skaffold CLI to accelerate the inner development loop and how to create effective continuous integration/continuous deployment (CI/CD) pipelines and perform build and deployment to manage Kubernetes instances such as Google Kubernetes Engine (GKE), Microsoft's Azure Kubernetes Service (AKS), and Amazon's Elastic Kubernetes Service (EKS).

This chapter will define the inner loop for application development and its importance, comparing the inner with the outer development loops, and cover the typical development workflows for a traditional monolith application and a container-native microservices application. We will have an in-depth discussion about the differences between these two approaches.

In this chapter, we're going to cover the following main topics:

  • Understanding what the application development inner loop is
  • Inner versus outer development loops
  • Exploring the traditional application development inner loop
  • Checking out the container-native application development inner loop

By the end of this chapter, you will understand the traditional and container-native application inner development loops.

Technical requirements

To follow along with the examples in this chapter, you need the following:

You can download the code examples for this chapter from the GitHub repository at https://github.com/PacktPublishing/Effortless-Cloud-Native-App-Development-Using-Skaffold/tree/main/Chapter01

Understanding the application development inner loop

The application development inner loop is an iterative process in which a developer changes the code, starts a build, runs the application, and then tests it. If something goes wrong, then we repeat the entire cycle.

So basically, it is the phase before a developer shares the changes done locally with others. Irrespective of your technology stack, the tools used, and personal preferences, the inner loop process may vary, but ideally, it could be summarized into the following three steps:

  1. Code
  2. Build
  3. Test

Here is a quick visual representation of the inner development loop:

Figure 1.1 – Inner loop

Figure 1.1 – Inner loop

If you think about it, coding is the only step that adds value, and the rest of the steps are like a validation of your work, that is, confirming whether your code is compiling and tests are passing or not. Since developers spend most of their time on the inner loop, they don't like spending too much time on any of the steps. It should be swift. Moreover, as developers, we thrive on fast feedback.

All the steps that we have defined until now are happening locally on a developer's machine before committing the code to a source code repository. Once a developer commits and pushes changes to the source code repository, it typically starts their CI/CD pipeline, called the outer development loop (pull request, CI, deployment, and so on). Whether you are developing traditional monolith or container-native microservices applications, you should not neglect the importance of your inner development loop. Here is why you should care about your inner development loop:

  • If your inner development loop is slow and lacks automation, then the developer's productivity will plunge.
  • It would be best if you always aimed to optimize it because a slow inner loop will affect other dependent teams, and it will take much longer to deliver a new feature to your users.

Now that we've had a quick overview of the application development inner loop, let's compare the inner and outer development loops.

Inner versus outer development loops

As discussed earlier, as long as the developer works in their local environment to test things, they are in the inner loop. In general, a developer spends most of their time in the inner loop because it's fast and gives instant feedback. It usually involves the following steps:

  1. A developer starts working on a new feature request. Some code changes are done at this point.
  2. Once the developer feels confident about the changes, a build is started.
  3. If the build is successful, then the developer runs the unit tests.
  4. If the test passes, then the developer starts an instance of the application locally.
  5. They will switch to the browser to verify the changes.
  6. The developer will then trace logs or attach a debugger.
  7. If something breaks, then the developer will repeat the preceding steps.

But as soon as a developer commits and pushes the code to a source code repository, it triggers the outer development loop. The outer development loop is closely related to the CI/CD process. It involves steps such as the following:  

  1. CI checking out the source code
  2. Building the project
  3. Running functional and integration test suites
  4. Creating runtime artifacts (JAR, WAR, and so on)
  5. Deploying to the target environment
  6. Testing and repeating

All the preceding steps are typically automated and require minimal to no involvement on the part of a developer. When the CI/CD pipeline breaks because of a test failure or compilation issue, the developer should get notified and then start working again on the inner development loop to fix this issue. Here is a visualization of the inner loop versus the outer loop:

Figure 1.2 – Inner loop versus outer loop

Figure 1.2 – Inner loop versus outer loop

It's very tempting to use CI/CD as a replacement for your inner development loop. Let's discuss whether this is a good approach or not.

Why not use CI/CD?

Contrary to what we just discussed about the inner loop, some developers may say that they don't care about their inner development loop because they have a CI/CD process for it, which should suffice. They are not entirely wrong as these pipelines are purpose-built to make the process of modern application development repeatable and straightforward. Still, your CI/CD process only solves a unique set of problems.

Using CI/CD as a replacement for your inner development loop will make the entire process even slower. Imagine having to wait for the whole CI/CD system to run your build and test suite, and then deploy only to find out that you made a small mistake; it would be quite aggravating. Now, you would have to wait and repeat the entire process just because of some silly mistake. It would be much easier if we can avoid unnecessary iterations. For your inner development loop, you must iterate quickly and preview changes as if they are happening on a live cluster.

We have covered enough basics about the application development inner loop, and now we will cover the traditional application development inner loop for Java developers.

Exploring the traditional application development inner loop

Before containers were cool, we were spoilt by the choices we have for the inner development loop. Your IDE can run builds for you in the background, and then you can deploy your application and test your changes locally. A typical traditional application development inner loop involves steps such as the following:

  1. A developer making code changes in an IDE
  2. Building and packaging the application
  3. Deploying and then running locally on a server
  4. Finally, testing the changes and repeating the step

    Here is a visualization of the traditional application development inner loop:

Figure 1.3 – Traditional application development inner loop

Figure 1.3 – Traditional application development inner loop

For Java developers, there are many options available to automate this process. Some of the most popular options are as follows:

  • Spring Boot Developer Tools
  • JRebel

Let's discuss these options briefly.

Spring Boot Developer Tools

Spring Boot first introduced developer tools in version 1.3. Spring Boot Developer Tools provide fast feedback loops and automatic restart of the application for any code changes done. It provides the following functionalities:

  • It provides a hot reloading feature. As soon as any file changes are done on classpath, it will automatically reboot the application. The automatic restart may differ based on your IDE. Please check the official documentation (https://docs.spring.io/spring-boot/docs/1.5.16.RELEASE/reference/html/using-boot-devtools.html#using-boot-devtools-restart) for more details on this.
  • It provides integration with the LiveReload plugin (http://livereload.com) so that it can refresh the browser automatically whenever a resource is changed. Internally, Spring Boot will start an embedded LiveReload server, which will trigger a browser refresh whenever a resource is changed. The plugin is available for most popular browsers, such as Chrome, Firefox, and Safari.
  • It not only supports the local development process, but you can opt-in for updating and restarting your application running remotely on a server or cloud. You can enable remote debugging as well if you like. However, there is a security risk involved in using this feature in production.

The following is a short snippet of how to add relevant dependencies to your Maven and Gradle projects to add support for Spring Boot Developer Tools. Maven/Gradle should have an introduction section first:

Maven pom.xml

<dependencies>
  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
  </dependency>
</dependencies>

Gradle build.gradle

Here is the code for Gradle:

dependencies {
compileOnly("org.springframework.boot:spring-boot-devtools")
}

But this is not how we will add dependencies to test the auto-reload feature of developer tools. We will use the Spring Initializr website (https://start.spring.io/) to generate the project stub based on the options you choose. Here are the steps we'll follow:

  1. You can go ahead with default options or make your own choices. You can select the build tools (Maven or Gradle), language (Java, Kotlin, or Groovy), and Spring Boot version of your choice.
  2. After that, you can add necessary dependencies by clicking on the ADD DEPENDENCIES… button and selecting the dependencies required for your application.
  3. I have chosen the default options and added spring-boot-starter-web, spring-boot-dev-tools, and Thymeleaf as dependencies for my demo Hello World Spring Boot application.
  4. Now, go ahead and click on the GENERATE button to download the generated source code on your computer. Here is the screen you should see:
    Figure 1.4 – Spring Initializr home page

    Figure 1.4 – Spring Initializr home page

  5. After the download, you can import the project to your IDE.

The next logical step is to build a simple Hello World Spring Boot web application. Let's begin.

Anatomy of the Spring Boot web application

The best way to understand the working parts of the Spring Boot application is by taking a look at an example. In this example, we will create a simple Spring Web MVC application that will accept HTTP GET requests at http://localhost:8080/hello. We will get an HTML web page with "Hello, John!" in the HTML body in response. We will allow the user to customize the default response by entering the query string in the http://localhost:8080/hello?name=Jack URL so that we can change the default message. Let's begin:

  1. First, let's create a HelloController bean using the @Controller annotation for handling incoming HTTP requests. The @GetMapping annotation binds the HTTP GET request to the hello() method:
    @Controller
    public class HelloController {
       @GetMapping("/hello")
       public String hello(@RequestParam(defaultValue =     "John", name = "name", required = false) String name,     Model model) {
          model.addAttribute("name", name);
          return "index";
    }
    }

    This controller returns the name of the view, which is index in our case. The view technology we have used here is Thymeleaf, which is responsible for server-side rendering of the HTML content.

  2. In the source code template, index.html is available under the templates folder in src/main/resources/. Here are the contents of the file:
    <!DOCTYPE HTML>
    <html xmlns:th="http://www.thymeleaf.org">
    <head>
          <meta charset="UTF-8"/>
          <title>Welcome</title>
    </head>
    <body>
    <p th:text="'Hello, ' + ${name} + '!'" />
    </body>
    </html>
  3. Spring Boot provides an opinionated setup for your application, which includes a main class as well:
    @SpringBootApplication
    public class Application {
       public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
       }
    }
  4. We will run our application using mvn spring-boot:run maven goal, which is provided by spring-boot-maven-plugin:
    Figure 1.5 – Output of the application

    Figure 1.5 – Spring Boot application startup logs

    Note

    To reduce the verbosity of the logs, we have trimmed them down to show only the parts that are relevant to our discussion.

    If you observe the logs carefully, we have developer tools support enabled, an embedded Tomcat server listening at port 8080, and an embedded LiveReload server running on port 35279. So far, this looks good. Once the application is started, you can access the http://localhost:8080/hello URL.

    Figure 1.6 – REST endpoint response

    Figure 1.6 – REST endpoint response

  5. Now we will do a small code change in the Java file and save it and you can see from the logs that the embedded Tomcat server was restarted. In the logs, you can also see that the thread that has spawned the application is not a main thread instead of a restartedMain thread:
    2021-02-12 16:28:54.500   INFO 53622 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]          : Initializing Spring DispatcherServlet 'dispatcherServlet'
    2021-02-12 16:28:54.500   INFO 53622 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet            : Initializing Servlet 'dispatcherServlet'
    2021-02-12 16:28:54.501   INFO 53622 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet            : Completed initialization in 1 ms
    2021-02-12 16:29:48.762   INFO 53622 --- [          Thread-5] o.s.s.concurrent.ThreadPoolTaskExecutor   : Shutting down ExecutorService 'applicationTaskExecutor'
    2021-02-12 16:29:49.291   INFO 53622 --- [   restartedMain] c.e.helloworld.HelloWorldApplication       : Started HelloWorldApplication in 0.483 seconds (JVM running for 66.027)
    2021-02-12 16:29:49.298   INFO 53622 --- [   restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
    2021-02-12 16:29:49.318   INFO 53622 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]          : Initializing Spring DispatcherServlet 'dispatcherServlet'
    2021-02-12 16:29:49.319   INFO 53622 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet            : Initializing Servlet 'dispatcherServlet'
    2021-02-12 16:29:49.320   INFO 53622 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet            : Completed initialization in 1 ms

This completes the demo of the auto-restart feature of the Spring Boot Developer Tools. We have not covered the LiveReload feature for brevity as it would be difficult to explain here because it all happens in real time.

JRebel

JRebel (https://www.jrebel.com/products/jrebel) is another option for Java developers for accelerating their inner loop development process. It is a JVM plugin, and it helps in reducing time for local development steps such as building and deploying. It is a paid tool developed by a company named Perforce. However, there is a free trial for 10 days if you would like to play with it. It provides the following functionalities:

  • It allows developers to skip rebuild and redeploys and see live updates of their changes by just refreshing the browser.
  • It will enable developers to be more productive while maintaining the state of their application.
  • It provides an instant feedback loop, which allows you to test and fix your issues early in your development.
  • It has good integration with popular frameworks, application servers, build tools, and IDEs.

There are many different ways to enable support for JRebel to your development process. We will consider the possibility of using it with an IDE such as Eclipse or IntelliJ. For both IDEs, you can install the plugin, and that's it. As I said earlier, this is a paid option, and you can only use it for free for 10 days.

For IntelliJ IDEA, you can install the plugin from the marketplace.

Figure 1.7 – IntelliJ IDEA installing JRebel

Figure 1.7 – IntelliJ IDEA installing JRebel

For the Eclipse IDE, you can install the plugin from Eclipse Marketplace.

Figure 1.8 – Eclipse IDE installing JRebel

Figure 1.8 – Eclipse IDE installing JRebel

Since JRebel is a paid option, we will not be exploring it in this book, but you are free to test it yourself.

We have covered the traditional application development inner loop life cycle and tools such as Spring Boot Developer Tools and JRebel, which allow rapid application development. Let's now go through the container-native application development inner loop life cycle.

Checking out the container-native application development inner loop

Kubernetes and containers have introduced a new set of challenges and complexities to the inner development loop. Now there are an additional set of steps added to the inner loop while developing applications, which is time-consuming. A developer would prefer to spend time solving business problems rather than waiting for the build process to complete.

It involves steps such as the following:

  1. A developer making code changes in an IDE
  2. Building and packaging the application
  3. Creating a container image
  4. Pushing the image to a container registry
  5. Kubernetes pulling the image from the registry
  6. Kubernetes creating and deploying the pod
  7. Finally, testing and repeating

Engineers at Google call this an infinite loop of pain and suffering. Here is a visualization of the container-native application development inner loop:

Figure 1.9 – Container-native application development inner loop

Figure 1.9 – Container-native application development inner loop

As you can see, we now have three more steps added to the inner development loop, that is, creating a container image of your application, pushing it to a container registry, and finally, pulling the image while deploying to a container orchestration tool such as Kubernetes.

The container image could be a Docker or OCI format image, depending on the tool you use to build your images. You have options such as Docker Hub, AWS Container Registry, Google Container Registry, or Azure Container Registry for the container registry. Then, finally, in deployment, for your container orchestration, you have tools such as Kubernetes, which will first pull the image from the container registry and deploy your application.

There are many manual steps involved here. It also depends on what tools you have used for the local development workflow. For instance, you will use commands such as the following:

docker build 
docker tag
docker push 
kubectl apply

The following are the detailed steps that a developer has to go through while developing container-native applications:

  1. Defining how to configure the OS for your container with a Dockerfile
  2. Defining the packaging of your application into a container image by adding instructions to the Dockerfile
  3. Creating a container image with Docker commands such as docker build and docker tag
  4. Uploading the container image to a container registry with a command such as docker push
  5. Writing one or more Kubernetes resource files in YAML
  6. Deploying your application to the cluster with commands such as kubectl apply -f myapp.yaml
  7. Deploying services to the cluster with commands such as kubectl apply -f mysvc.yaml
  8. Writing the config so that apps can work together with commands such as kubectl create configmap
  9. Configuring apps to work together correctly with commands such as kubectl apply -f myappconfigmap.yaml

Wooh!!! That's a lot of steps and a time-consuming process. You can use scripting or docker compose to automate it to some extent, but soon you will realize that it cannot be fully automated without a tool such as Skaffold, which can abstract away many things related to building and deployment.

In Chapter 3, Skaffold – Easy-Peasy Cloud-Native Kubernetes Application Development, we will cover Skaffold, which simplifies the process we have covered here with a single command. My only intention here was to give you an idea of the steps involved. We will cover these steps with some hands-on examples in the next chapter.

Summary

In this chapter, we have covered many topics, such as what a typical inner development loop is and its importance. We have also discussed how both the inner and outer development loops are different, and then we explored whether the CI/CD process can act as a replacement for the inner development loop.

We then discussed the steps involved in the traditional application development inner loop and we covered tools such as Spring Developer Tools and JRebel, which make the application development a lot easier. To explain this further, we created a simple Spring Boot web MVC application. Finally, in the last section, we covered the container-native application development inner loop. We also covered the steps involved in container-native application development.

In this chapter, the focus was on introducing you to concepts such as inner and outer development. You can use Spring Boot Developer Tools and JRebel to accelerate/automate your traditional application development life cycle.

In the next chapter, we will cover the problems a developer faces while developing an application with Kubernetes.

Further reading

Left arrow icon Right arrow icon

Key benefits

  • Learn how to build and deploy cloud-native applications quickly with Kubernetes
  • Create a production-ready continuous integration and continuous delivery (CI/CD) pipeline for cloud-native apps
  • Discover ways to create a GitOps-style CD workflow for cloud-native applications

Description

Kubernetes has become the de facto standard for container orchestration, drastically improving how we deploy and manage cloud-native apps. Although it has simplified the lives of support professionals, we cannot say the same for developers who need to be equipped with better tools to increase productivity. An automated workflow that solves a wide variety of problems that every developer faces can make all the difference! Enter Skaffold – a command-line tool that automates the build, push, and deploy steps for Kubernetes applications. This book is divided into three parts, starting with common challenges encountered by developers in building apps with Kubernetes. The second part covers Skaffold features, its architecture, supported container image builders, and more. In the last part, you'll focus on practical implementation, learning how to deploy Spring Boot apps to cloud platforms such as Google Cloud Platform (GCP) using Skaffold. You'll also create CI/CD pipelines for your cloud-native apps with Skaffold. Although the examples covered in this book are written in Java and Spring Boot, the techniques can be applied to apps built using other technologies too. By the end of this Skaffold book, you'll develop skills that will help accelerate your inner development loop and be able to build and deploy your apps to the Kubernetes cluster with Skaffold.

Who is this book for?

Cloud-native application developers, software engineers working with Kubernetes, and DevOps professionals who are looking for a solution to simplify and improve their software development life cycle will find this book useful. Beginner-level knowledge of Docker, Kubernetes, and the container ecosystem is required to get started with this book.

What you will learn

  • Overcome challenges faced while working in an inner development loop using Skaffold
  • Accelerate your development workflow using Skaffold
  • Understand Skaffold s architecture, internal working, and supported CLI commands
  • Build and deploy containers to Kubernetes using the Skaffold CLI and Cloud Code
  • Deploy Spring Boot applications to fully managed Kubernetes services such as Google Kubernetes Engine using Skaffold
  • Explore best practices for developing an app with Skaffold
  • Avoid common pitfalls when developing cloud-native apps with Skaffold in Kubernetes

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 15, 2021
Length: 272 pages
Edition : 1st
Language : English
ISBN-13 : 9781801076951
Vendor :
Oracle
Category :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Oct 15, 2021
Length: 272 pages
Edition : 1st
Language : English
ISBN-13 : 9781801076951
Vendor :
Oracle
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 557.97
Automating Workflows with GitHub Actions
zł177.99
Effortless Cloud-Native App Development Using Skaffold
zł157.99
Modern DevOps Practices
zł221.99
Total 557.97 Stars icon
Banner background image

Table of Contents

14 Chapters
Section 1: The Kubernetes Nightmare – Skaffold to the Rescue Chevron down icon Chevron up icon
Chapter 1: Code, Build, Test, and Repeat – The Application Development Inner Loop Chevron down icon Chevron up icon
Chapter 2: Developing Cloud-Native Applications with Kubernetes – A Developer's Nightmare Chevron down icon Chevron up icon
Chapter 3: Skaffold — Easy-Peasy Cloud-Native Kubernetes Application Development Chevron down icon Chevron up icon
Section 2: Getting Started with Skaffold Chevron down icon Chevron up icon
Chapter 4: Understanding Skaffold's Features and Architecture Chevron down icon Chevron up icon
Chapter 5: Installing Skaffold and Demystifying Its Pipeline Stages Chevron down icon Chevron up icon
Chapter 6: Working with Skaffold Container Image Builders and Deployers Chevron down icon Chevron up icon
Section 3: Building and Deploying Cloud-Native Spring Boot Applications with Skaffold Chevron down icon Chevron up icon
Chapter 7: Building and Deploying a Spring Boot Application with the Cloud Code Plugin Chevron down icon Chevron up icon
Chapter 8: Deploying a Spring Boot Application to the Google Kubernetes Engine Using Skaffold Chevron down icon Chevron up icon
Chapter 9: Creating a Production-Ready CI/CD Pipeline with Skaffold Chevron down icon Chevron up icon
Chapter 10: Exploring Skaffold Alternatives, Best Practices, and Pitfalls Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(14 Ratings)
5 star 71.4%
4 star 28.6%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Priya R Shastri Nov 05, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Review of Effortless cloud native application development using Skaffold by Ashish Choudhary.Priya ShastriThis book is for cloud native application developers working with Kubernetes and using cloud native DevOps solution to simplify their inner CI/CD pipeline.The application development inner loop is an iterative process in which a developer uses the code, build and test loop to produce effective code. Skaffold is an open source tool use to automate the build run deploy cycle. This book is an excellent resource for developers using skaffold.In chapter 1 the code, build, test loop, the author describes the use of IDEs like Eclipse and the plugin “JRebel that helps the java developers with the buildign and deploying of code. In chapter 2 the author discusses the introduction of Skaffold and why it is important for developers who want to write code in Kubernetes. It provides an automated build and test environment. Skaffold is the CLI tool that creates automated build, test tool to set up the environment for Kubernetes. It is an open source tool developed by Google and released in 2019. Skaffold features and architectures are discussed in chapter 4. Skaffold supports the builds for dockerfile, jib, Bazel, cloud native buildpacks. In chapter 6 we learn about working with Skaffold image builders and deployers. In chapter 7 we learn about building and deploying a springboot application using cloud plugin and Skaffold. In chapter 8 the author talks about deploying kubernetes on GKE (Google kubernetes Engine) using Skaffold. In chapter 9 a production ready CI/CD pipeline is explained using Skaffold. Finally in chapter 10 you have best practices for Skaffold and pitfalls. It talks about telepresence, oketo, Garden and docker compose as alternatives to Skaffold.I would strongly recommend this book for anyone who is deploying kubernetes on GKE or creating CI/CD pipelines on Jenkins/Github.Skaffold is a useful tool.
Amazon Verified review Amazon
Shantanu Malik Oct 30, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Skaffold improves developer experience with Kubernetes. It's a great tool and this book provides in-depth overview of Skaffold with tons of coding examples. Highly recommended.
Amazon Verified review Amazon
Wielenga Geertjan Oct 15, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
In "Effortless Cloud-Native App Development Using Skaffold", Ashish Choudhary provides a thorough overview of Skaffold, with the book's subtitle clearly defining its agenda: "Simplify the development and deployment of Cloud-native SpringBoot applications on Kubernetes with Skaffold".Section 1, "The Kubernetes Nightmare – Skaffold to the Rescue", promises to describe "the pain and suffering of developing an application with Kubernetes", with Skaffold as the solution to help in automating the building, pushing, and deployment of applications running on Kubernetes.-- In chapter 1, "Code, Build, Test, and Repeat – The Application Development Inner Loop", the author explains what the "application development inner loop" is, as well as the inner versus outer development loops, together with an exploration of the traditional application development inner loop in contrast to the container-native application development inner loop. All this is discussed in the context of JRebel and SpringBoot, with their related tools and technologies.-- With the previous chapter having focused on traditional development workflows, chapter 2, "Developing Cloud-Native Applications with Kubernetes – A Developer's Nightmare", expounds upon the "hardships that a developer has to go through while developing Cloud-native applications with Kubernetes". The key stumbling blocks turn out to be focused on developers wanting simplified workflows via Kubernetes while not being nor wanting to be Kubernetes experts. "Developers just want to code rather than worry about how and where their applications will be deployed," is a statement that is hard to argue with.-- What you get in chapter 3, "Skaffold — Easy-Peasy Cloud-Native Kubernetes Application Development", is a clear introduction to Skaffold. "Skaffold is a CLI tool that automates the build, push, and deploy steps for Cloud-native applications running on local or remote Kubernetes clusters of your choice. Skaffold is not a replacement for Docker or Kubernetes. It works in conjunction with them and handles the build, push, and deploy boilerplate part for you." Complete instructions for setting up your environment, introducing you to the Skaffold command line, with code samples throughout the book, are provided.Section 2: "Getting Started with Skaffold" goes through everything connected to the basic Skaffold usage, from a run down of its features, an overview of its architecture, bootstrapping projects with Skaffold, including building and deploying container images with Skaffold.-- With chapter 4, "Understanding Skaffold's Features and Architectures", you learn about Skaffold's specificities, such as "super-fast local development, effortless remote development, built-in tag management, lightweight capabilities, and file sync capability". Really useful in this chapter are several diagrams and images aimed at "demystifying" Skaffold's architecture. By the end of the chapter, you have a really solid understanding of what Skaffold can do for you.-- Chapter 5, "Installing Skaffold and Demystifying Its Pipeline Stages" gets you into the nitty gritty of installing specificities on different operating systems, as well as the command line, as well as the various stages of its pipeline, such as "init", "build", and "deploy", wrapping up with an introduction to its debugging facilities.-- In chapter 6, "Working with Skaffold Container Image Builders and Deployers", you are introduced to reactive programming, while buidling a SpringBoot CRUD application and being shown Skaffold's supported container image builders, from Docker to kaniko to Jib to Buildpacks. You also learn about the different ways to deploy images to a Kubernetes cluster using tools such as kubectl, Helm, and Kustomize.Section 3: "Building and Deploying Cloud-Native SpringBoot Applications with Skaffold" has as its focus the building and deployment of SpringBoot applications using Skaffold to local (minikube and more) and remote clusters (GKE).-- In chapter 7, "Building and Deploying a SpringBoot Application with the Cloud Code Plugin", you are introduced to Google's Cloud Code plugin, which is available with IDEs such as IntelliJ. The author shows you step by step how to create a SpringBoot application while using the plugin to deploy it to a local Kubernetes cluster.-- Chapter 8, "Deploying a SpringBoot Application to the Google Kubernetes Engine Using Skaffold" shows you how to deploy the same SpringBoot application from the previous chapter to the remote Google Kubernetes Engine (GKE), which is a managed Kubernetes service provided by the Google Cloud Platform.-- Next, in chapter 9, "Creating a Production-Ready CI/CD Pipeline with Skaffold", you are shown how to create a production-ready continuous integration (CI) and continuous deployment (CD) pipeline for the same SpringBoot application as before, using Skaffold and GitHub Actions.-- Chapter 10, "Exploring Skaffold Alternatives, Best Practices, and Pitfalls" starts by looking at other tools that provide similar functionalities as Skaffold: Telepresence, Tilt.dev, OpenShift Do, Oketo, Garden, and docker-compose. Next, you learn several tips and tricks to follow while developing Cloud-native Kubernetes applications with Skaffold, including how to do faster builds and how to solve typical problems, as well as a range of pitfalls and Skaffold's future roadmap.Over the years, tooling around Kubernetes has improved significantly in line with the increased adoption of Kubernetes in the industry. Developers need tools that increase productivity while being able to quickly develop applications for the Cloud.Skaffold dramatically enhances that process and there is no better time than the present for a book such as this, which can surely be seen to be some kind of Skaffold Bible. The author provides a complete and thorough overview of the central issues faced by users of Kubernetes, presents Skaffold as a solution, highlights its features and pitfalls, while placing it within the context of the broader ecosystem of comparable solutions.
Amazon Verified review Amazon
Shai Almog Nov 16, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
First a disclaimer: I got the book for free with the purpose of reading/reviewing it. I wasn't paid and I don't know the author. I don't use affiliate links and don't profit in any way from this review.I think the value of a technology book is comprised of two factors:- Clarity of writing- Value of the technologyThe first part is the easy one. The clarity and writing style is excellent. The style is easy to read quickly without focusing on too many niche terms. It's pretty easy to get boggled down by acronyms when reading this type of book and thankfully Choudhary doesn't fall into that trap. He did his job well.So the value of the book is on the shoulders of the technology. Is Skaffold valuable?That's obviously a personal case. I’m not a devops and unfortunately I’m pretty bad at that. That’s why when I heard about Skaffold it instantly piqued my interest. Write Kubernetes cloud native apps without well… Writing Kubernetes native apps… That's a pretty attractive proposition to me.After reading the book I like a lot of what Skaffold is trying to accomplish but I'm also a bit held back by my problems with GKE (which isn't essential to skaffold) and the limited support for polyglot development. Overall I think it's worth knowing, especially if you plan to stick to Spring Boot, Java and Kotlin.
Amazon Verified review Amazon
Jeff S. Dec 06, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
So often in organizations they are migrating application stacks into the cloud and doing a 'lift and shift'. This is the worst possible way to utilize the cloud. Indeed, this book goes into depth on how to develop applications with a cloud-first approach that should be a requirement of any organization engaged in a cloud service!The book was in-depth, included plenty of examples and was very clearly written. It covered Open-Source Software solutions and was very approachable to me. I am not a developer, but I think I'm going to head that way eventually in my career. And this is a solid footing of what tools are available to the developer for building applications in the cloud.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.