Optimize Node.js Development Workflows in Kubernetes with Skaffold and Rancher Desktop

Rate this content
Bookmark

In this talk, you will learn how to optimise your Node.js development and release workflow to Kubernetes with Skaffold and Rancher Desktop. Using these tools together helps enhance the local K8s development experience mirroring a real cluster experience, as well as the release workflow you would have for your remote cluster. We will cover the challenges of local Kubernetes development, how Skaffold and Rancher Desktop help, demonstrations of local releases to a cluster and how to use the same configuration for remote cluster releases.

9 min
25 Mar, 2022

Video Summary and Transcription

Lucan de Muela discusses how to optimize Node.js development workflows in Kubernetes using Scaffold and Rancher Desktop. He highlights the developer experience, cluster management simplification with Rancher Desktop, and build/release workflow optimization with Scaffold. He also mentions the ability to update Kubernetes versions and choose a container runtime, as well as the option to reset the cluster for a safe development environment.

Available in Español

1. Optimizing Node.js Workflows in Kubernetes

Short description:

Hi, I'm Lucan de Muela, a Principal Technical Evangelist at SUSE. In this lightning talk, I'll show you how to optimize your Node.js development workflows in Kubernetes with Scaffold and Rancher Desktop. We'll consider the developer experience, how Rancher Desktop simplifies cluster management, optimizing build and release workflows with Scaffold, and a demo. Kubernetes solves real problems, and Rancher Desktop and Scaffold can complement core developer priorities while incorporating DevOps practices. Rancher Desktop is an intuitive UI that simplifies cluster management, and Skaffold automates the process of building and deploying container images. Let's take a quick look at them in action.

Hi there, I'm Lucan de Muela, or you can call me Luke. I'm going to be talking to you about optimizing your Node.js development workflows in Kubernetes with Scaffold and Rancher Desktop. I'm a Principal Technical Evangelist at SUSE, so you can feel free to get in touch with me on various social media platforms, whether it's Twitter or LinkedIn, following me on GitHub, or subscribing to my YouTube channel.

Now, this is a lightning talk, but I've still got some golden nuggets that you can walk away with in a short amount of time. For starters, we're going to consider the developer experience when building your Node.js apps for Kubernetes. Then, we'll look at how Rancher Desktop simplifies the cluster management life cycle, followed by optimizing build and release workflows with Scaffold, and then we'll cap it off with a demo. Which is usually everyone's favorite part.

Now, if you're a developer and you've got experience working on cloud-native apps, you might actually have been reluctant to tune into this session, because you want to focus on your application development. Kubernetes is predominantly seen as a separate world that shouldn't get in the way of what you should be prioritizing. Personally, I agree with that. However, there's a slight conundrum because Kubernetes does solve real problems. And your team might be dealing with those problems, and so Kubernetes might be a solution that's in the bigger picture of your architecture. So you have to be a part of the journey either way.

And this is where things get even trickier because there's different ideas around who should own what. Now, my goal is to demonstrate how Rancher Desktop and Scaffold can complement the core developer priorities and still incorporate DevOps practices like release workflows for application deployments to your Kubernetes cluster. An example of this would be going beyond NodeMod. Now, I love using NodeMod when building out my Node.js apps because it quickly rebuilds the changes and I get to see those reflected. But what if you could accomplish that with a full CICD pipeline on your local machine with all the intricacies abstracted away, but still remaining configurable for a local context as well as for remote deployments? We'll take a look at that shortly.

Now, the first tool in this solution is Rancher Desktop. RD is a desktop application available on Windows, Linux, and Mac. It's an electron-based application that wraps a host of components under the hood with a virtual machine running K3S and either ContainerD or DockerD, depending on your configuration choice. In the end, you have an intuitive UI that simplifies the cluster management process, and you can easily upgrade or reset your cluster with just a few clicks.

The second tool in this solution, or one-two punch in mind, is Skaffold. And Skaffold's goal is to simplify the Kubernetes development workflow by automating and abstracting away the process of building and deploying container images. The inter-development loop of iteratively coding, building, and testing your apps is something that can be enhanced by Skaffold, because it will take your local changes and trigger a pipeline for deployment whenever it detects them. And this is especially helpful for debugging your apps before they end up in the final target cluster. So using RD and Skaffold enables developers to stay focused on application optimization because they give you the combination of a cluster that's easy to interact with and manage, and a configurable workflow process that is automated and abstracts the DevOps details. So let's take a look at this in action real quick. As you can see, I've got Rancher Desktop open and running, and I'm currently in the Kubernetes settings section. And over here, a lot of the main things that happen around your Kubernetes cluster management and optimization would actually be consolidated in this particular section.

2. Updating Kubernetes Version and Cluster Reset

Short description:

You can easily update your Kubernetes version and choose a container runtime. You can modify the virtual machine and reset the cluster. There's also a reset button for hard resets, providing a safe environment for local cluster development.

So as you can see, I can easily update my Kubernetes version just by using this dropdown over here. And this will obviously depend on the particular version that you or your team have agreed upon. In addition to that, if you wanted to choose a particular container runtime between ContainerD and DockerD, that's something that you can toggle with over here. And then you have different situations when it comes to your applications. You might find that some are memory intensive, some are compute intensive, but you want to have the opportunity to modify the virtual machine that you're working with. And so you can do that over here by updating the particular memory in the CPU, and that will just reset your cluster. And also, if you did need to do a hard reset to delete all the workloads and the configuration that you had set up, for whatever reason, you could simply hit the reset button over here. And that's cool, especially when it comes to local cluster development because you have the safety of the blast radius not impacting other people or other teams. But nonetheless, you want to be able to have a nice way of just ejecting and starting all over again.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Node Congress 2022Node Congress 2022
26 min
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Top Content
Do you know what’s really going on in your node_modules folder? Software supply chain attacks have exploded over the past 12 months and they’re only accelerating in 2022 and beyond. We’ll dive into examples of recent supply chain attacks and what concrete steps you can take to protect your team from this emerging threat.
You can check the slides for Feross' talk here.
React Advanced Conference 2021React Advanced Conference 2021
19 min
Automating All the Code & Testing Things with GitHub Actions
Top Content
Code tasks like linting and testing are critical pieces of a developer’s workflow that help keep us sane like preventing syntax or style issues and hardening our core business logic. We’ll talk about how we can use GitHub Actions to automate these tasks and help keep our projects running smoothly.
DevOps.js Conf 2022DevOps.js Conf 2022
33 min
Fine-tuning DevOps for People over Perfection
Demand for DevOps has increased in recent years as more organizations adopt cloud native technologies. Complexity has also increased and a "zero to hero" mentality leaves many people chasing perfection and FOMO. This session focusses instead on why maybe we shouldn't adopt a technology practice and how sometimes teams can achieve the same results prioritizing people over ops automation & controls. Let's look at amounts of and fine-tuning everything as code, pull requests, DevSecOps, Monitoring and more to prioritize developer well-being over optimization perfection. It can be a valid decision to deploy less and sleep better. And finally we'll examine how manual practice and discipline can be the key to superb products and experiences.
Node Congress 2022Node Congress 2022
34 min
Out of the Box Node.js Diagnostics
In the early years of Node.js, diagnostics and debugging were considerable pain points. Modern versions of Node have improved considerably in these areas. Features like async stack traces, heap snapshots, and CPU profiling no longer require third party modules or modifications to application source code. This talk explores the various diagnostic features that have recently been built into Node.
You can check the slides for Colin's talk here. 

Workshops on related topic

Node Congress 2023Node Congress 2023
109 min
Node.js Masterclass
Workshop
Have you ever struggled with designing and structuring your Node.js applications? Building applications that are well organised, testable and extendable is not always easy. It can often turn out to be a lot more complicated than you expect it to be. In this live event Matteo will show you how he builds Node.js applications from scratch. You’ll learn how he approaches application design, and the philosophies that he applies to create modular, maintainable and effective applications.

Level: intermediate
Node Congress 2023Node Congress 2023
63 min
0 to Auth in an Hour Using NodeJS SDK
WorkshopFree
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.JS backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.
Table of contents- A quick intro to core authentication concepts- Coding- Why passwordless matters
Prerequisites- IDE for your choice- Node 18 or higher
JSNation 2023JSNation 2023
104 min
Build and Deploy a Backend With Fastify & Platformatic
WorkshopFree
Platformatic allows you to rapidly develop GraphQL and REST APIs with minimal effort. The best part is that it also allows you to unleash the full potential of Node.js and Fastify whenever you need to. You can fully customise a Platformatic application by writing your own additional features and plugins. In the workshop, we’ll cover both our Open Source modules and our Cloud offering:- Platformatic OSS (open-source software) — Tools and libraries for rapidly building robust applications with Node.js (https://oss.platformatic.dev/).- Platformatic Cloud (currently in beta) — Our hosting platform that includes features such as preview apps, built-in metrics and integration with your Git flow (https://platformatic.dev/). 
In this workshop you'll learn how to develop APIs with Fastify and deploy them to the Platformatic Cloud.
JSNation Live 2021JSNation Live 2021
156 min
Building a Hyper Fast Web Server with Deno
WorkshopFree
Deno 1.9 introduced a new web server API that takes advantage of Hyper, a fast and correct HTTP implementation for Rust. Using this API instead of the std/http implementation increases performance and provides support for HTTP2. In this workshop, learn how to create a web server utilizing Hyper under the hood and boost the performance for your web apps.
React Summit 2022React Summit 2022
164 min
GraphQL - From Zero to Hero in 3 hours
Workshop
How to build a fullstack GraphQL application (Postgres + NestJs + React) in the shortest time possible.
All beginnings are hard. Even harder than choosing the technology is often developing a suitable architecture. Especially when it comes to GraphQL.
In this workshop, you will get a variety of best practices that you would normally have to work through over a number of projects - all in just three hours.
If you've always wanted to participate in a hackathon to get something up and running in the shortest amount of time - then take an active part in this workshop, and participate in the thought processes of the trainer.