<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rob Richardson</title>
    <description>The latest articles on DEV Community by Rob Richardson (@robrich).</description>
    <link>https://dev.to/robrich</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F911424%2F52063db1-a7b7-4244-80d3-352707f5f9c0.jpg</url>
      <title>DEV Community: Rob Richardson</title>
      <link>https://dev.to/robrich</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/robrich"/>
    <language>en</language>
    <item>
      <title>Deploy a Python App to Kubernetes in 5 Minutes with Jetpack.io</title>
      <dc:creator>Rob Richardson</dc:creator>
      <pubDate>Mon, 12 Sep 2022 19:52:22 +0000</pubDate>
      <link>https://dev.to/robrich/deploy-a-python-app-to-kubernetes-in-5-minutes-with-jetpackio-5123</link>
      <guid>https://dev.to/robrich/deploy-a-python-app-to-kubernetes-in-5-minutes-with-jetpackio-5123</guid>
      <description>&lt;h2&gt;
  
  
  Deploying to Kubernetes is Hard
&lt;/h2&gt;

&lt;p&gt;Maybe you can relate: We've finished coding a website, and we're ready to deploy. We know we want to deploy to Kubernetes, to take advantage of it's industrial-scale hosting, automatic load-balancing, fault tolerance, scaling, and more.&lt;/p&gt;

&lt;p&gt;But deploying to Kubernetes is hard. Now we have to trek into the land of containers, pods, services, ingress, and yaml. Ugh. "I just finished the website. I don't want to read a book just to make it work." Kubernetes has too many options and concepts: Pods, Deployments, ReplicaSets, Services, ConfigMaps. Oh my! And the Kubernetes yaml file is really confusing and specific. I really wish it was easier to deploy a website to Kubernetes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Jetpack.io
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.jetpack.io/"&gt;Jetpack.io&lt;/a&gt; is a zero-DevOps solution for deploying to Kubernetes. Jetpack.io takes your code, packages it up in a container, and publishes it to Kubernetes. Jetpack.io also creates a public URL so the site can be routable from the internet, and can stream application logs back to your terminal. All of the toil of Kubernetes melts away, and we can focus on our application.&lt;/p&gt;

&lt;p&gt;This guide will teach you how to setup up the Jetpack backend development platform for the very first time, and how to build and deploy your first backend to a Kubernetes cluster in a matter of minutes.&lt;/p&gt;

&lt;p&gt;You don't even need an existing Kubernetes cluster to get started – we'll give you access to a free cluster to get you up and running!&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the Jetpack CLI
&lt;/h2&gt;

&lt;p&gt;The Jetpack Command Line Interface (CLI) is a command-line tool that helps you create, build and deploy new backends directly from your terminal. It’s simple to install and works for both macOS and Linux.&lt;/p&gt;

&lt;p&gt;To install it, run the install script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://get.jetpack.io -fsSL | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Validate the installation by running the jetpack version command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jetpack version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Login to Jetpack
&lt;/h2&gt;

&lt;p&gt;Next, you'll sign-up for a new Jetpack Cloud account, which will grant you access to a free Kubernetes cluster and a container registry managed by us.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the following command to authenticate the CLI:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jetpack auth login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create a new account by following the instructions in your browser, or if you already have an account, use your existing credentials to log in.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your CLI is now linked to your account and it's ready to deploy new backends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clone Jetpack's quickstart project
&lt;/h2&gt;

&lt;p&gt;Jetpack can deploy any containerized application to Kubernetes as an autoscaling, Kubernetes deployment. For this quickstart, we'll use a simple example FastAPI app from Jetpack's example repo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/jetpack-io/jetpack-examples.git
cd jetpack-examples/01-py-fastapi-quickstart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Initialize your project
&lt;/h2&gt;

&lt;p&gt;This launch a generator which will ask you a few questions to configure your project. For this quickstart, we'll choose the following options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What is the name of this application?&lt;/strong&gt; 01-py-fastapi-quickstart&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose your project template Web Service&lt;/strong&gt; (Since we're creating a web app with an API)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Would you like to use Jetpack's trial cluster, or your own Kubernetes cluster?&lt;/strong&gt; jetpack-cloud (We'll use Jetpack's trial cluster)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's the output you'll see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;? What is the name of this application? test-app
? What type of application is this? Web Service
? Would you like to use Jetpack's trial cluster, or your own kubernetes cluster? jetpack-cloud
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a &lt;code&gt;jetconifg.yaml&lt;/code&gt; in your project folder. This file has the basic configuration that Jetpack will use to deploy your project to Kubernetes. You should commit this file to source control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy to Kubernetes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Deploy the Test App with Jetpack Dev
We are now ready to deploy our example app! We'll deploy using jetpack dev , which will stream our service's logs to our terminal and let us quickly redeploy any changes that we make.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From within the quickstart-project folder, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jetpack dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create and build a Docker container for your project, push it to the container registry, and deploy it to the Kubernetes cluster. Once it finishes deploying, the CLI will stream your logs and port-forward from your local machine to the running container, so that you can test it live in the cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Done] App deployed
Attempting to port forward app...
The service will be accessible at http://localhost:8080
     - this port forwards to port 8080 on the pod
Attempting to port forward runtime...
The service will be accessible at http://localhost:8090
     - this port forwards to port 8080 on the pod
+ jetpack-runtime-7c46d5cd7b-d2ksj › jetpack-runtime
+ new-project-app-68b9f8cddf-xgpzg › app
new-project-app-68b9f8cddf-xgpzg app INFO:     Started server process [1]
new-project-app-68b9f8cddf-xgpzg app INFO:     Waiting for application startup.
new-project-app-68b9f8cddf-xgpzg app INFO:     Application startup complete.
new-project-app-68b9f8cddf-xgpzg app INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Test your Service
When Jetpack finishes deploying, you can test the service at &lt;code&gt;http://localhost:8080&lt;/code&gt; using &lt;code&gt;curl&lt;/code&gt;, &lt;code&gt;httpie&lt;/code&gt;, or your browser:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl localhost:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Hello! Welcome to Jetpack&amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Well that was easy
&lt;/h2&gt;

&lt;p&gt;It's easy to deploy a Python app to Kubernetes with Jetpack.io. In this tutorial we scaffolded a website, configured it for Jetpack.io, and used Jetpack.io to deploy to Kubernetes. Jetpack.io is a great zero-DevOps solution for deploying to Kubernetes. Visit &lt;a href="https://jetpack.io/docs/"&gt;https://jetpack.io/docs/&lt;/a&gt; to learn more and to start deploying your content to Kubernetes with ease.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Deploy a JavaScript, Node.js, and Express Website to Kubernetes in 5 Minutes with Jetpack.io</title>
      <dc:creator>Rob Richardson</dc:creator>
      <pubDate>Mon, 12 Sep 2022 19:36:51 +0000</pubDate>
      <link>https://dev.to/robrich/deploy-a-javascript-nodejs-and-express-website-to-kubernetes-in-5-minutes-with-jetpackio-307a</link>
      <guid>https://dev.to/robrich/deploy-a-javascript-nodejs-and-express-website-to-kubernetes-in-5-minutes-with-jetpackio-307a</guid>
      <description>&lt;h2&gt;
  
  
  Deploying to Kubernetes is Hard
&lt;/h2&gt;

&lt;p&gt;Maybe you can relate: We've finished coding a website, and we're ready to deploy. We know we want to deploy to Kubernetes, to take advantage of it's industrial-scale hosting, automatic load-balancing, fault tolerance, scaling, and more.&lt;/p&gt;

&lt;p&gt;But deploying to Kubernetes is hard. Now we have to trek into the land of containers, pods, services, ingress, and yaml. Ugh. "I just finished the website. I don't want to read a book just to make it work." Kubernetes has too many options and concepts: Pods, Deployments, ReplicaSets, Services, ConfigMaps. Oh my! And the Kubernetes yaml file is really confusing and specific. I really wish it was easier to deploy a website to Kubernetes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Jetpack.io
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.jetpack.io/"&gt;Jetpack.io&lt;/a&gt; is a zero-DevOps solution for deploying to Kubernetes. Jetpack.io takes your code, packages it up in a container, and publishes it to Kubernetes. Jetpack.io also creates a public URL so the site can be routable from the internet, and can stream application logs back to your terminal. All of the toil of Kubernetes melts away, and we can focus on our application.&lt;br&gt;
In this tutorial, we'll build an Express website in JavaScript, configure it for Jetpack.io, and deploy it to Kubernetes – all in 5 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an Express.js app with Node.js
&lt;/h2&gt;

&lt;p&gt;In this example we'll quickly scaffold an Express website. You could swap out these steps with use an existing Node web site, or scaffold a site using other frameworks or tools.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open a terminal in an empty directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate an Express website:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx express-generator --view hbs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have a regular Node.js website. Feel free to customize this site to meet your needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure the App for Containers
&lt;/h2&gt;

&lt;p&gt;Jetpack.io assumes your web server is running on port &lt;code&gt;8080&lt;/code&gt; from inside a Docker container. In this section we'll build a Dockerfile to run the web site on port &lt;code&gt;8080&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new file in the folder named Dockerfile and add this content:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM node:alpine
WORKDIR /app
COPY . .
RUN npm install
ENV PORT=8080
EXPOSE 8080
CMD ["npm", "start"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: this is a bare-bones Dockerfile. Depending on your app's dependencies, you may need to add more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initialize the project with Jetpack.io
&lt;/h2&gt;

&lt;p&gt;Jetpack.io needs some initial configuration to understand the Node.js web server. We need only do this once per website.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To install the Jetpack CLI, open a terminal and run
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl https://get.jetpack.io -fsSL | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Jetpack CLI works on Linux, macOS, and on Windows via WSL2.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login to Jetpack CLI:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jetpack auth login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Logging into Jetpack allows you to deploy to the Jetpack.io Kubernetes cluster. You can also run on your own cluster in your Azure, AWS, GCP, or private cloud account.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initialize the project for Jetpack:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jetpack init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This wizard interviews you and configures the Jetpack deployment strategy to match your application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Answer that &lt;strong&gt;Yes, this is a web server&lt;/strong&gt;. This tells Jetpack that we want to accept inbound traffic.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If we were building a scheduled cron job or a function that drained a queue, we could answer no.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Finish the wizard, and Jetpack CLI automatically generates an appropriate &lt;code&gt;jetconfig.yaml&lt;/code&gt; file. You should commit this to source control.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Deploy to Kubernetes using Jetpack.io
&lt;/h2&gt;

&lt;p&gt;Now that the project is configured for Jetpack, deploying is really easy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open a terminal in the directory with the Dockerfile and jetconfig.yaml file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy to Kubernetes:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jetpack dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now Jetpack makes the deployment really simple. Automatically it will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build the Docker image&lt;/li&gt;
&lt;li&gt;Push the image to a private registry&lt;/li&gt;
&lt;li&gt;Schedule the necessary Kubernetes resources&lt;/li&gt;
&lt;li&gt;Create a publicly routable URL to test the website&lt;/li&gt;
&lt;li&gt;Setup port-forwarding from your local machine&lt;/li&gt;
&lt;li&gt;Stream application logs back to the terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Test the website:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the console output will be the publicly routable URL. Click this URL to view the web page.&lt;/p&gt;

&lt;p&gt;Jetpack also sets up port-forwarding, so you can also browse to &lt;a href="http://localhost:8080/"&gt;http://localhost:8080/&lt;/a&gt; to view the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Well that was easy
&lt;/h2&gt;

&lt;p&gt;It's easy to deploy a Node.js and Express.js app built with JavaScript to Kubernetes with Jetpack.io. In this tutorial we scaffolded a website, configured it for Jetpack.io, and used Jetpack.io to deploy to Kubernetes. Jetpack.io is a great zero-DevOps solution for deploying to Kubernetes. Visit &lt;a href="https://jetpack.io/docs/"&gt;https://jetpack.io/docs/&lt;/a&gt; to learn more and to start deploying your content to Kubernetes with ease.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Devbox 0.0.4 is released!</title>
      <dc:creator>Rob Richardson</dc:creator>
      <pubDate>Thu, 08 Sep 2022 16:12:36 +0000</pubDate>
      <link>https://dev.to/robrich/devbox-004-is-released-1ih8</link>
      <guid>https://dev.to/robrich/devbox-004-is-released-1ih8</guid>
      <description>&lt;p&gt;We’re excited to showcase the next release of Devbox with important fixes and new features. We’re overwhelmed by the community support and interest in this project, so this release also includes important fixes contributed by you.  If you'd like to add new features to Devbox, we welcome &lt;a href="https://github.com/jetpack-io/devbox/pulls"&gt;Pull Requests&lt;/a&gt;. Want to request a new feature or report a bug? &lt;a href="https://github.com/jetpack-io/devbox/issues"&gt;Submit an issue&lt;/a&gt; to the Devbox team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update to the Latest Version
&lt;/h2&gt;

&lt;p&gt;Devbox automatically updates to the latest version each time you run a command.&lt;/p&gt;

&lt;p&gt;You can confirm you’re running &lt;code&gt;0.0.4&lt;/code&gt; by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;devbox version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  New in 0.0.4
&lt;/h2&gt;

&lt;p&gt;This quick summary isn’t an exhaustive list of new content in this release, but highlights the major user-facing features in this release.  For a full list of features, see &lt;a href="https://github.com/jetpack-io/devbox/commits/main"&gt;the new commits&lt;/a&gt; since 0.0.3 was released just a week ago.&lt;/p&gt;

&lt;h3&gt;
  
  
  Path fix
&lt;/h3&gt;

&lt;p&gt;Packages installed by Devbox now take priority over your local &lt;code&gt;PATH&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If your &lt;code&gt;~/.bashrc&lt;/code&gt;, &lt;code&gt;~/.zshrc&lt;/code&gt; or other shell startup script prefixed the path, this would overwrite the modifications Devbox made to the &lt;code&gt;PATH&lt;/code&gt;.  We now correctly add Nix packages at the beginning of the PATH after running your shell’s startup script.  Thank you to &lt;a href="https://github.com/methyl"&gt;@methyl&lt;/a&gt;, &lt;a href="https://github.com/TheGlenn88"&gt;@TheGlenn88&lt;/a&gt; and others for reporting this issue.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stages
&lt;/h3&gt;

&lt;p&gt;Stages are used to configure and run commands at different points of container creation. Devbox will automatically detect and configure the correct stage commands for your project based on your source code, but you can override any of these stages by configuring them in your devbox.json:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;install stage&lt;/strong&gt; will run after your base container has been initialized and your Nix packages are installed. This stage should be used to download and build your application's dependencies&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;build stage&lt;/strong&gt; runs after the install stage, and should be used to build or bundle your application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;start stage&lt;/strong&gt; will run when your container is started. This stage should include any commands needed to start and run your application.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if you were running a Node.js project, you might configure the stages in your devbox.json like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   {
       "packages": [
           "nodejs"
       ],
       "install_stage": {
           "command": "npm install"
       },
       "build_stage":{
           "command":"npm run build"
       },
       "start_stage": {
           "command": "node ./dist/index.js"
       }
   }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See the &lt;a href="https://www.jetpack.io/devbox/docs/configuration/#stages"&gt;Devbox Docs&lt;/a&gt; to learn more.&lt;/p&gt;

&lt;h3&gt;
  
  
  Devbox shell indicator
&lt;/h3&gt;

&lt;p&gt;Once you launch &lt;code&gt;devbox shell&lt;/code&gt;, a new indicator notes that you’re inside a Devbox shell.  This will make it easier to quickly identify if you’re in a shell.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s2912Ws9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res-1.cloudinary.com/jetpack-io/image/upload/q_auto/v1/blog/devbox-indicator.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s2912Ws9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res-1.cloudinary.com/jetpack-io/image/upload/q_auto/v1/blog/devbox-indicator.png" alt="Devbox indicator" width="550" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Devbox website
&lt;/h3&gt;

&lt;p&gt;We’re excited to debut a brand-new website and docs pages for Devbox.  If you’d like to dig deeper into Devbox than the ReadMe, you now have a great place to learn about &lt;a href="https://jetpack.io/devbox/"&gt;Devbox&lt;/a&gt;.  For example, to learn more about the &lt;a href="https://www.jetpack.io/devbox/docs/cli_reference/"&gt;CLI options&lt;/a&gt; on the docs pages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python + Poetry support
&lt;/h3&gt;

&lt;p&gt;In addition to Go language detection, we now also auto-detect Poetry applications written in Python, and install the proper tools.  The container image is based on a &lt;a href="https://github.com/GoogleContainerTools/distroless"&gt;distroless&lt;/a&gt; image, making the resulting image small.&lt;/p&gt;

&lt;p&gt;To get started with Python &amp;amp; Poetry:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open a terminal in the source directory with your &lt;code&gt;poetry.lock&lt;/code&gt; file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Initialize Devbox:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  devbox init
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start the shell:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  devbox shell
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This also works with &lt;code&gt;devbox build&lt;/code&gt; to build the container.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anonymous Telemetry
&lt;/h3&gt;

&lt;p&gt;The Devbox CLI now reports anonymous telemetry.  This helps us better understand which features are used and lets us lean into the features you deem important.  Users who prefer not to send telemetry can opt out by setting the &lt;code&gt;DO_NOT_TRACK=1&lt;/code&gt; environment variable. See &lt;a href="https://jetpack.io/devbox/docs/telemetry/"&gt;this page&lt;/a&gt; for how we use this information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update today
&lt;/h2&gt;

&lt;p&gt;We’re really excited about this new release of Devbox. Devbox automatically updates every time you run a command, so you may already have this version.&lt;/p&gt;

&lt;p&gt;Need to install Devbox on a new machine? Install today:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -fsSL https://get.jetpack.io/devbox | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And let us know what you think on &lt;a href="https://discord.gg/agbskCJXk2"&gt;Discord&lt;/a&gt; and on &lt;a href="https://twitter.com/jetpack_io"&gt;Twitter&lt;/a&gt;.  See an issue that didn’t make it into this release?  Let us know in &lt;a href="https://github.com/jetpack-io/devbox/issues"&gt;Github Issues&lt;/a&gt; or better yet, add the feature and create a &lt;a href="https://github.com/jetpack-io/devbox/pulls"&gt;Pull Request&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devbox</category>
      <category>shell</category>
      <category>container</category>
    </item>
    <item>
      <title>Devbox 📦 : Instant, easy, and predictable shells and containers</title>
      <dc:creator>Rob Richardson</dc:creator>
      <pubDate>Thu, 01 Sep 2022 22:10:12 +0000</pubDate>
      <link>https://dev.to/robrich/devbox-instant-easy-and-predictable-shells-and-containers-2jg0</link>
      <guid>https://dev.to/robrich/devbox-instant-easy-and-predictable-shells-and-containers-2jg0</guid>
      <description>&lt;h2&gt;
  
  
  What is it?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/jetpack-io/devbox"&gt;Devbox&lt;/a&gt; is a command-line tool that lets you easily create isolated shells and containers. You start by defining the list of packages required by your development environment, and devbox uses that definition to create an isolated environment just for your application.&lt;/p&gt;

&lt;p&gt;In practice, Devbox works similar to a package manager like &lt;code&gt;yarn&lt;/code&gt; – except the packages it manages are at the operating-system level (the sort of thing you would normally install with &lt;code&gt;brew&lt;/code&gt; or &lt;code&gt;apt-get&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Devbox was originally developed by &lt;a href="https://www.jetpack.io"&gt;jetpack.io&lt;/a&gt; and is internally powered by &lt;code&gt;nix&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why we built it?
&lt;/h2&gt;

&lt;p&gt;As a team, we wanted all of our engineers to have predictable development environments. Everyone should have the same tools, they should mirror production, and as a new engineer you should get that environment with a single command. At first, we created a docker container that reflected our development environment. But that brought other problems: the file system (and thus compilation) was really slow, and if you accidentally exited the container the build cache would get destroyed. We decided that developing inside a container was simply too slow. So we went looking for a solution that could work locally on our laptop. We decided to give nix a try. Nix solved a lot of the problems, it was promising! But its UX was more complex than necessary. It requires learning a new language in which you write nix expressions – which seemed hard to maintain.&lt;/p&gt;

&lt;p&gt;And that's why we wrote Devbox. It's a wrapper around nix that makes the use-cases we care about really easy to use. If you know how to use yarn, you know how to use Devbox.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The example below creates a development environment with &lt;code&gt;python 2.7&lt;/code&gt; and &lt;code&gt;go 1.18&lt;/code&gt;, even though those packages are not installed in the underlying machine:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WMBaXQZmDoA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A consistent shell for everyone on the team
&lt;/h3&gt;

&lt;p&gt;Declare the list of tools needed by your project via a &lt;code&gt;devbox.json&lt;/code&gt; file and run &lt;code&gt;devbox shell&lt;/code&gt;. Everyone working on the project gets a shell environment with the exact same version of those tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try new tools without polluting your laptop
&lt;/h3&gt;

&lt;p&gt;Development environments created by Devbox are isolated from everything else in your laptop. Is there a tool you want to try without making a mess? Add it to a Devbox shell, and remove it when you don't want it anymore – all while keeping your laptop pristine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't sacrifice speed
&lt;/h3&gt;

&lt;p&gt;Devbox can create isolated environments right on your laptop, without an extra-layer of virtualization slowing your file system or every command. When you're ready to ship, it'll turn it into an equivalent container – but not before.&lt;/p&gt;

&lt;h3&gt;
  
  
  Good-bye conflicting versions
&lt;/h3&gt;

&lt;p&gt;Are you working on multiple projects, all of which need different versions of the same binary? Instead of attempting to install conflicting versions of the same binary on your laptop, create an isolated environment for each project, and use whatever version you want for each.&lt;/p&gt;

&lt;h3&gt;
  
  
  Instantly turn your application into a container
&lt;/h3&gt;

&lt;p&gt;Devbox analyzes your source code and instantly turns it into an OCI-compliant image that can be deployed to any cloud. The image is optimized for speed, size, security and caching ... and without needing to write a &lt;code&gt;Dockerfile&lt;/code&gt;. And unlike &lt;a href="https://buildpacks.io/"&gt;buildpacks&lt;/a&gt;, it does it quickly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stop declaring dependencies twice
&lt;/h3&gt;

&lt;p&gt;Your application often needs the same set of dependencies when you are developing on your laptop, and when you're packaging it as a container ready to deploy to the cloud. Devbox's dev environments are &lt;em&gt;isomorphic&lt;/em&gt;: meaning that we can turn them into both a local shell environment or a cloud-ready container, all without having to repeat yourself twice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Devbox
&lt;/h2&gt;

&lt;p&gt;In addition to installing Devbox itself, you will need to install &lt;code&gt;nix&lt;/code&gt; and &lt;code&gt;docker&lt;/code&gt; since Devbox depends on them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install &lt;a href="https://nixos.org/download.html"&gt;Nix Package Manager&lt;/a&gt;. (Don't worry, you don't need to learn Nix.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install &lt;a href="https://docs.docker.com/engine/install/"&gt;Docker Engine&lt;/a&gt; or &lt;a href="https://www.docker.com/get-started/"&gt;Docker Desktop&lt;/a&gt;. Note that docker is only needed if you want to create containers – the shell functionality works without it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install Devbox:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://get.jetpack.io/devbox | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quickstart: Fast, Deterministic Shell
&lt;/h2&gt;

&lt;p&gt;In this quickstart we’ll create a development shell with specific tools installed. These tools will only be available when using this Devbox shell, ensuring we don’t pollute your machine.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open a terminal in a new empty folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Initialize Devbox:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   devbox init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a &lt;code&gt;devbox.json&lt;/code&gt; file in the current directory. You should commit it to source control.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add command-line tools from &lt;a href="https://search.nixos.org/packages"&gt;Nix Packages&lt;/a&gt;. For example, to add Python 3.10:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   devbox add python310
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Your &lt;code&gt;devbox.json&lt;/code&gt; file keeps track of the packages you've added, it should now look like this:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"packages"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="s2"&gt;"python310"&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Start a new shell that has these tools installed:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   devbox shell
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can tell you’re in a Devbox shell (and not your regular terminal) because the shell prompt and directory changed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use your favorite tools.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this example we installed Python 3.10, so let’s use it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   python &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Your regular tools are also available including environment variables and config settings.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git config &lt;span class="nt"&gt;--get&lt;/span&gt; user.name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;To exit the Devbox shell and return to your regular shell:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quickstart: Instant Docker Image
&lt;/h2&gt;

&lt;p&gt;Devbox makes it easy to package your application into an OCI-compliant container image. Devbox analyzes your code, automatically identifies the right toolchain needed by your project, and builds it into a docker image.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Initialize your project with &lt;code&gt;devbox init&lt;/code&gt; if you haven't already.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Build the image:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   devbox build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resulting image is named &lt;code&gt;devbox&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tag the image with a more descriptive name:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   docker tag devbox my-image:v0.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Auto-detected languages:
&lt;/h3&gt;

&lt;p&gt;Devbox currently detects the following languages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Want more languages? &lt;a href="https://github.com/jetpack-io/devbox/issues"&gt;Ask for a new Language&lt;/a&gt; or contribute one via a Pull Request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional commands
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;devbox help&lt;/code&gt; - see all commands&lt;/p&gt;

&lt;p&gt;&lt;code&gt;devbox plan&lt;/code&gt; - see the configuration and steps Devbox will use to generate a container&lt;/p&gt;

&lt;h2&gt;
  
  
  Join our Developer Community
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Chat with us by joining the &lt;a href="https://discord.gg/agbskCJXk2"&gt;Jetpack.io Discord Server&lt;/a&gt; – we have a #devbox channel dedicated to this project. &lt;/li&gt;
&lt;li&gt;File bug reports and feature requests using &lt;a href="https://github.com/jetpack-io/devbox/issues"&gt;Github Issues&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Follow us on &lt;a href="https://twitter.com/jetpack_io"&gt;Jetpack's Twitter&lt;/a&gt; for product updates&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>shell</category>
      <category>container</category>
      <category>developer</category>
    </item>
    <item>
      <title>Deploy a C# &amp; .NET Core Website to Kubernetes in 5 Minutes with Jetpack.io</title>
      <dc:creator>Rob Richardson</dc:creator>
      <pubDate>Thu, 25 Aug 2022 21:59:00 +0000</pubDate>
      <link>https://dev.to/robrich/deploy-a-c-net-core-website-to-kubernetes-in-5-minutes-with-jetpackio-17da</link>
      <guid>https://dev.to/robrich/deploy-a-c-net-core-website-to-kubernetes-in-5-minutes-with-jetpackio-17da</guid>
      <description>&lt;h2&gt;
  
  
  Deploying to Kubernetes is Hard
&lt;/h2&gt;

&lt;p&gt;Maybe you can relate: We've finished coding a website, and we're ready to deploy. We know we want to deploy to Kubernetes, to take advantage of it's industrial-scale hosting, automatic load-balancing, fault tolerance, scaling, and more.&lt;/p&gt;

&lt;p&gt;But deploying to Kubernetes is hard. Now we have to trek into the land of containers, pods, services, ingress, and yaml. Ugh. "I just finished the website. I don't want to read a book just to make it work." Kubernetes has too many options and concepts: Pods, Deployments, ReplicaSets, Services, ConfigMaps. Oh my! And the Kubernetes yaml file is really confusing and specific. I really wish it was easier to deploy a website to Kubernetes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;a href="https://www.jetpack.io/"&gt;Jetpack.io&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Jetpack.io is a zero-DevOps solution for deploying to Kubernetes. Jetpack.io takes your code, packages it up in a container, and publishes it to Kubernetes. Jetpack.io also creates a public URL so the site can be routable from the internet, and can stream application logs back to your terminal. All of the toil of Kubernetes melts away, and we can focus on our application.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/bA8ISQylW1Q"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this tutorial, we'll build an ASP.NET Core website in C#, configure it for &lt;a href="https://www.jetpack.io/"&gt;Jetpack.io&lt;/a&gt;, and deploy it to Kubernetes -- all in 5 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  I. Building a C# and .NET App
&lt;/h2&gt;

&lt;p&gt;In this example we'll quickly scaffold an ASP.NET Core MVC application. You could swap out these steps to use an existing ASP.NET Core web site, or scaffold a site using Razor Pages, Web API, or Minimal APIs.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open Visual Studio&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the new project dialog doesn't open automatically, choose File -&amp;gt; New Project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose ASP.NET (Model, View, Controller) and click next.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TwTWP8qc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res-1.cloudinary.com/jetpack-io/image/upload/q_auto/v1/blog/net-to-k8s-new-project-mvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TwTWP8qc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res-1.cloudinary.com/jetpack-io/image/upload/q_auto/v1/blog/net-to-k8s-new-project-mvc.png" alt="ASP.NET MVC" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Choose a good name for this project, and save to a convenient directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the Additional Information section, check &lt;strong&gt;Enable Docker&lt;/strong&gt; then click Create.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oCPSDnGB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res-2.cloudinary.com/jetpack-io/image/upload/q_auto/v1/blog/net-to-k8s-new-project-docker-support.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oCPSDnGB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res-2.cloudinary.com/jetpack-io/image/upload/q_auto/v1/blog/net-to-k8s-new-project-docker-support.png" alt="Enable Docker" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You must have Docker Desktop installed for this function to work correctly.&lt;/p&gt;

&lt;p&gt;Now we have a regular ASP.NET website. Feel free to customize this site to meet your needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  II. Configure the App for &lt;a href="https://www.jetpack.io/"&gt;Jetpack.io&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Jetpack.io assumes your web server is running on port &lt;code&gt;8080&lt;/code&gt;, but the default project in ASP.NET runs on port &lt;code&gt;80&lt;/code&gt;. In this section we'll change the Dockerfile to run the web site on port &lt;code&gt;8080&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In the Solution Explorer, open Dockerfile.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove the 2 &lt;code&gt;EXPOSE&lt;/code&gt; lines and add a new &lt;code&gt;EXPOSE&lt;/code&gt; line:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   - EXPOSE 80
   - EXPOSE 443
   + EXPOSE 8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Just under the &lt;code&gt;EXPOSE&lt;/code&gt; line, add the environment variable telling ASP.NET Core to run on port &lt;code&gt;8080&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   EXPOSE 8080
   ENV ASPNETCORE_URLS http://+:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;+&lt;/code&gt; tells ASP.NET to listen on all interfaces rather than just localhost.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Save and close the Dockerfile.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In Windows Explorer, move the Dockerfile from the project directory up 1 level to the Solution directory.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Jetpack.io assumes the Dockerfile is in your root directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  III. Initialize the project with &lt;a href="https://www.jetpack.io/"&gt;Jetpack.io&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Jetpack.io needs some initial configuration to understand the ASP.NET web server. We need only do this once per website.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To install the Jetpack CLI, open a terminal and run
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   curl https://get.jetpack.io &lt;span class="nt"&gt;-fsSL&lt;/span&gt; | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Jetpack CLI works on Linux, macOS, and on Windows via WSL2.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login to Jetpack CLI:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   jetpack auth login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Logging into Jetpack allows you to deploy to the Jetpack.io Kubernetes cluster. You can alsorun on your own cluster in your Azure, AWS, GCP, or private cloud account.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initialize the project for Jetpack:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   jetpack init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This wizard interviews you and configures the Jetpack deployment strategy to match your application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Answer that &lt;strong&gt;Yes, this is a web server&lt;/strong&gt;. This tells Jetpack that we want to accept inbound traffic.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If we were building a scheduled cron job or a function that drained a queue, we could answer no.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Finish the wizard, and Jetpack CLI automatically generates an appropriate &lt;code&gt;jetconfig.yaml&lt;/code&gt; file. You should commit this to source control.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  IV. Deploy to Kubernetes using &lt;a href="https://www.jetpack.io/"&gt;Jetpack.io&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Now that the project is configured for Jetpack, deploying is really easy.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open a terminal in the directory with the Dockerfile and jetconfig.yaml file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy to Kubernetes:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   jetpack dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now Jetpack makes the deployment really simple. Automatically it will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build the Docker image&lt;/li&gt;
&lt;li&gt;Push the image to a private registry&lt;/li&gt;
&lt;li&gt;Schedule the necessary Kubernetes resources&lt;/li&gt;
&lt;li&gt;Create a publicly routable URL to test the website&lt;/li&gt;
&lt;li&gt;Setup port-forwarding from your local machine&lt;/li&gt;
&lt;li&gt;Stream application logs back to the terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Test the website:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the console output will be the publicly routable URL. Click this URL to view the web page.&lt;/p&gt;

&lt;p&gt;Jetpack also sets up port-forwarding, so you can also browse to &lt;a href="http://localhost:8080/"&gt;http://localhost:8080/&lt;/a&gt; to view the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Well that was easy
&lt;/h2&gt;

&lt;p&gt;It's easy to deploy an ASP.NET app built with C# to Kubernetes with Jetpack.io. In this tutorial we scaffolded a website, configured it for Jetpack.io, and used Jetpack.io to deploy to Kubernetes. Jetpack.io is a great zero-DevOps solution for deploying to Kubernetes. Visit &lt;a href="https://jetpack.io/docs/"&gt;https://jetpack.io/docs/&lt;/a&gt; to learn more and to start deploying your content to Kubernetes with ease.&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>kubernetes</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
