<?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: Tillman Mosley III</title>
    <description>The latest articles on DEV Community by Tillman Mosley III (@tillman_mosleyiii).</description>
    <link>https://dev.to/tillman_mosleyiii</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%2F1932810%2Fd31b4ae8-8f74-46b9-bbda-3f9c321c7854.png</url>
      <title>DEV Community: Tillman Mosley III</title>
      <link>https://dev.to/tillman_mosleyiii</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tillman_mosleyiii"/>
    <language>en</language>
    <item>
      <title>From Zero to Deployed: Soroban RPC on Kubernetes in DigitalOcean</title>
      <dc:creator>Tillman Mosley III</dc:creator>
      <pubDate>Thu, 15 Aug 2024 11:48:01 +0000</pubDate>
      <link>https://dev.to/tillman_mosleyiii/from-zero-to-deployed-soroban-rpc-on-kubernetes-in-digitalocean-2f52</link>
      <guid>https://dev.to/tillman_mosleyiii/from-zero-to-deployed-soroban-rpc-on-kubernetes-in-digitalocean-2f52</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/stellar"&gt;Build Better on Stellar: Smart Contract Challenge &lt;/a&gt;: Create a Tutorial&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Your Tutorial
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A fully registered domain name with an available A record

&lt;ul&gt;
&lt;li&gt;Example: &lt;code&gt;rpc.your_domain.com&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;You can purchase a domain from Namecheap or any domain registrar&lt;/li&gt;
&lt;li&gt;This domain will be used to create a custom endpoint for your RPC server&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;An API testing client.

&lt;ul&gt;
&lt;li&gt;Recommended:
&lt;a href="https://httpie.io/" rel="noopener noreferrer"&gt;https://httpie.io/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Alternative: Postman or curl&lt;/li&gt;
&lt;li&gt;This will be used to verify the functionality of your RPC server&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This tutorial will guide you through the process of deploying your own Soroban RPC (Remote Procedure Call) server on DigitalOcean's Kubernetes platform. Soroban is Stellar's smart contract platform, and having your own RPC server allows you to interact with the Stellar network for smart contract operations without relying on public infrastructure.&lt;/p&gt;

&lt;p&gt;Benefits of deploying your own Soroban RPC server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Increased reliability and uptime&lt;/li&gt;
&lt;li&gt;Control over server resources and configuration&lt;/li&gt;
&lt;li&gt;Potential for better performance compared to public endpoints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end of this tutorial, you'll have a fully functional Soroban RPC server accessible via your custom domain.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  Target audience
&lt;/h2&gt;

&lt;p&gt;This tutorial is designed for developers with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Intermediate knowledge of Kubernetes&lt;/li&gt;
&lt;li&gt;Basic familiarity with DigitalOcean's cloud platform&lt;/li&gt;
&lt;li&gt;Interest in Stellar blockchain development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While prior experience with these technologies is helpful, we'll provide detailed explanations for each step.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  Step by Step Instructions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step - Create Kubernetes Cluster in DigitalOcean
&lt;/h3&gt;

&lt;p&gt;A Kubernetes cluster on DigitalOcean has one or more node pools. Each node pool consists of a group of identical worker nodes. Worker nodes are built on Droplets. For this tutorial, we can build a cluster with two worker nodes in one node pool.&lt;/p&gt;

&lt;h4&gt;
  
  
  Create Kubernetes cluster in DigitalOcean
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-a-cluster-using-the-control-panel" rel="noopener noreferrer"&gt;https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-a-cluster-using-the-control-panel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;a. Log into your DigitalOcean account and navigate to the Kubernetes section.&lt;/p&gt;

&lt;p&gt;b. Click "Create Cluster" and choose the following settings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cluster capacity: 2 GB RAM / 1 vCPU per node&lt;/li&gt;
&lt;li&gt;Node count: 2 nodes (minimum for basic redundancy)&lt;/li&gt;
&lt;li&gt;Datacenter region: Choose the closest to your target users&lt;/li&gt;
&lt;li&gt;Cluster name: e.g., "soroban-rpc-cluster"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;c. Click "Create Cluster" and wait for provisioning (this may take several minutes).&lt;/p&gt;

&lt;p&gt;Rationale: This cluster configuration provides a balance between cost and reliability for a personal RPC server.&lt;/p&gt;

&lt;p&gt;If you want to create a single node cluster, you will have to select a larger node size.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step - Follow Getting Started with Kubernetes guide under the Overview Tab
&lt;/h3&gt;

&lt;p&gt;While the cluster is being provisioned, we can follow along with the rest of the setup instructions that appear under the Overview tab by clicking on Get Started&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg4vp80vee2q61yl6tzo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg4vp80vee2q61yl6tzo.png" alt="Getting Started" width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Connecting to Kubernetes
&lt;/h4&gt;

&lt;p&gt;The first step in connecting to Kubernetes requires additional applications:&lt;/p&gt;

&lt;p&gt;Install doctl&lt;br&gt;
&lt;a href="https://docs.digitalocean.com/reference/doctl/how-to/install/" rel="noopener noreferrer"&gt;https://docs.digitalocean.com/reference/doctl/how-to/install/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install kubectl&lt;br&gt;
&lt;a href="https://kubernetes.io/docs/tasks/tools/" rel="noopener noreferrer"&gt;https://kubernetes.io/docs/tasks/tools/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install Helm&lt;br&gt;
&lt;a href="https://helm.sh/docs/intro/install/" rel="noopener noreferrer"&gt;https://helm.sh/docs/intro/install/&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Verify connectivity to Kubernetes
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;In the DigitalOcean dashboard, go to your cluster's "Overview" tab&lt;/li&gt;
&lt;li&gt;Click "Get Started" and copy the provided doctl command&lt;/li&gt;
&lt;li&gt;Run this command in your terminal to configure kubectl&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rationale: These tools are essential for managing your Kubernetes cluster and deploying applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgf40em0rvlvqzt8gn0p5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgf40em0rvlvqzt8gn0p5.png" alt="Connect to Kubernetes" width="800" height="497"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Connect to Your Newly Provisioned Cluster Using doctl
&lt;/h4&gt;

&lt;p&gt;Verify Connectivity&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl cluster-info
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Display addresses of the control plane and cluster services&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;doctl kubernetes cluster list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Displays a variety of commands that help manage your cluster via DigitalOcean's API&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ay2rrh6gwpkfg5nq5lo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ay2rrh6gwpkfg5nq5lo.png" alt="Verify connectivity" width="800" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step - Add SDF Helm Chart Repository
&lt;/h3&gt;

&lt;p&gt;Stellar Development Foundation (SDF) provides Helm charts for easy deployment of Stellar applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add SDF Helm Chart Repository to Your System:&lt;/strong&gt;&lt;br&gt;
We will first need to add the Helm Chart repository to our system using the following helm commands:&lt;/p&gt;

&lt;p&gt;The helm repo add command adds the chart repository to your local Helm registry&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;helm repo add stellar https://helm.stellar.org/charts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The helm repo update command updates the information of available charts locally from the chart repositories you have added to your Helm registry.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;helm repo update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5762jifn8frefyfwfui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5762jifn8frefyfwfui.png" alt="Add and update Helm repo" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rationale: This step allows you to easily install and manage Stellar applications on your Kubernetes cluster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step - Deploy Soroban RPC Workload
&lt;/h3&gt;

&lt;p&gt;Now that we have added the SDF chart repository to our local registry and updated the charts that are available to us, we can now deploy a workload using one of the charts available.&lt;/p&gt;

&lt;p&gt;a. Create a local deployment configuration file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start with the testnet configuration:
&lt;a href="https://github.com/stellar/helm-charts/blob/main/charts/soroban-rpc/testnet-values.yaml" rel="noopener noreferrer"&gt;https://github.com/stellar/helm-charts/blob/main/charts/soroban-rpc/testnet-values.yaml&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Save this as soroban-rpc-values.yaml on your local machine&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since we will be connecting our RPC server to testnet, we can uncomment update Soroban RPC image tag to the latest version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;sorbanRpc&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
 &lt;span class="s"&gt;....&lt;/span&gt;
    &lt;span class="s"&gt;tag&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt; &lt;span class="s"&gt;latest&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcgwpcd5vt39rvq0syxhj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcgwpcd5vt39rvq0syxhj.png" alt="Update config" width="800" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the ingress section in the configuration file, add your fully registered domain name for the host value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;rpc.your_domain&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also want to uncomment and update the Ingress class name&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;ingressClassName:nginx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbcskt4fuxq8n156fnw1k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbcskt4fuxq8n156fnw1k.png" alt="Update Ingress class name" width="800" height="486"&gt;&lt;/a&gt;&lt;br&gt;
After we have finished with our configuration file, we can use that to install Soroban RPC into our Kubernetes cluster&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;helm install my-soroban-rpc stellar/soroban-rpc --values=testnet-values.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivq9hdkcfjzmyj0kljnh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivq9hdkcfjzmyj0kljnh.png" alt="Helm install of Soroban RPC" width="800" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rationale: This configuration sets up your RPC server to use the latest version and prepares it for public access via your domain.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step - Verify the Service Is Up and Running
&lt;/h3&gt;

&lt;p&gt;Check the status of your service&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndyc9hfla56o8vvdrb84.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndyc9hfla56o8vvdrb84.png" alt="Check Pod Status" width="800" height="77"&gt;&lt;/a&gt;&lt;br&gt;
‍&lt;/p&gt;

&lt;p&gt;Check the status of your pods&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;‍&lt;/p&gt;

&lt;p&gt;You should see pods related to Soroban RPC in a "Running" state.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step - Installing the Kubernetes Nginx Ingress Controller
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-on-digitalocean-kubernetes-using-helm" rel="noopener noreferrer"&gt;https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-on-digitalocean-kubernetes-using-helm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though we have verified that our service is running on our cluster in the previous step, we still cannot access the service from the outside. For that we will need to create an ingress, an ingress is a way for us to expose our service to the outside world. We will use the nginx ingress and we will first need to add the Nginx Helm Chart Repository to our system.&lt;/p&gt;

&lt;p&gt;The Nginx Ingress Controller manages external access to your services.&lt;/p&gt;

&lt;p&gt;Add Nginx Ingress Helm Chart Repository to Your System:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;‍&lt;/p&gt;

&lt;p&gt;We can now install the nginx ingress into our Kubernetes cluster&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;helm install nginx-ingress ingress-nginx/ingress-nginx --set controller.publishService.enabled=true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu72ol62qwehyrnvrj42q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu72ol62qwehyrnvrj42q.png" alt="Install Nginx ingress" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run this command to watch the load balancer become available. This process creates a load balancer in the cluster resource group in DigitalOcean.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl --namespace default get services -o wide -w nginx-ingress-ingress-nginx-controller
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuva27i0jm5srczi7cggz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuva27i0jm5srczi7cggz.png" alt="Watch for ingress creation" width="800" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39eldxbfm6pmqzbz8kag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39eldxbfm6pmqzbz8kag.png" alt="Check Node Pools" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rationale: The Ingress Controller allows external traffic to reach your RPC server securely.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step - Update DNS records to point to DigitalOcean loadbalancer
&lt;/h3&gt;

&lt;p&gt;a. Go to your domain registrar's DNS management page.&lt;/p&gt;

&lt;p&gt;b. Create an A record:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name: rpc (or your chosen subdomain)&lt;/li&gt;
&lt;li&gt;Value: The External-IP from the previous step&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;c. Save the changes and wait for DNS propagation (can take up to 48 hours, but often much faster).&lt;/p&gt;

&lt;p&gt;Rationale: This step connects your domain name to the DigitalOcean load balancer, allowing access to your RPC server.&lt;/p&gt;

&lt;p&gt;‍&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fycchcegro8u48uwwdcvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fycchcegro8u48uwwdcvy.png" alt="Add A record to DNS" width="800" height="172"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step - Verify You Can Connect to RPC Service Through Your Fully Qualified Domain
&lt;/h3&gt;

&lt;p&gt;Once DNS has propagated, test your RPC server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http POST https://rpc.your_domain jsonrpc="2.0"  id=867 method="getHealth"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftclbina6ne8m3q5s0imj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftclbina6ne8m3q5s0imj.png" alt="POST Test" width="772" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step - Cleanup
&lt;/h3&gt;

&lt;p&gt;If you need to remove the deployment:&lt;/p&gt;

&lt;p&gt;Delete Helm releases&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;helm uninstall soroban-rpc helm uninstall nginx-ingress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;‍&lt;/p&gt;

&lt;p&gt;Delete the Kubernetes cluster in the DigitalOcean dashboard.&lt;br&gt;
Remove the DNS A record from your domain registrar.&lt;/p&gt;
&lt;h2&gt;
  
  
  Maintenance Tips
&lt;/h2&gt;

&lt;p&gt;Regularly update your Soroban RPC server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;helm repo update helm upgrade soroban-rpc stellar/soroban-rpc -f soroban-rpc-values.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Monitor cluster health using DigitalOcean's dashboard or kubectl commands.&lt;br&gt;
Set up log aggregation for easier troubleshooting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Resources:
&lt;/h2&gt;

&lt;p&gt;‍&lt;br&gt;
&lt;a href="https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-a-cluster-using-the-control-panel" rel="noopener noreferrer"&gt;https://docs.digitalocean.com/products/kubernetes/how-to/create-clusters/#create-a-cluster-using-the-control-panel&lt;/a&gt;&lt;br&gt;
‍&lt;br&gt;
&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-on-digitalocean-kubernetes-using-helm" rel="noopener noreferrer"&gt;https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-on-digitalocean-kubernetes-using-helm&lt;/a&gt;&lt;br&gt;
‍&lt;br&gt;
&lt;a href="https://docs.digitalocean.com/products/kubernetes/getting-started/operational-readiness/enable-https/" rel="noopener noreferrer"&gt;https://docs.digitalocean.com/products/kubernetes/getting-started/operational-readiness/enable-https/&lt;/a&gt;&lt;br&gt;
‍&lt;br&gt;
&lt;a href="https://github.com/stellar/helm-charts/" rel="noopener noreferrer"&gt;https://github.com/stellar/helm-charts/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://soroban.stellar.org/docs" rel="noopener noreferrer"&gt;https://soroban.stellar.org/docs&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Created
&lt;/h2&gt;

&lt;p&gt;This tutorial guides developers through deploying a personal Soroban RPC (Remote Procedure Call) server on DigitalOcean's Kubernetes platform. This is valuable in a few ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Independence: Run your own infrastructure for interacting with the Stellar network's smart contract platform, reducing reliance on public endpoints.&lt;/li&gt;
&lt;li&gt;Reliability: Gain increased uptime and availability by controlling your own server.&lt;/li&gt;
&lt;li&gt;Performance: Potentially achieve better performance compared to shared public endpoints.&lt;/li&gt;
&lt;li&gt;Customization: Have full control over server resources and configuration to suit your specific needs.&lt;/li&gt;
&lt;li&gt;Learning: Gain practical experience with Kubernetes, DigitalOcean, and Stellar's infrastructure.&lt;/li&gt;
&lt;li&gt;Security: Manage your own secure endpoint for sensitive smart contract operations.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By following this tutorial, developers can set up a production-ready Soroban RPC server, accessible via a custom domain, enhancing their ability to build and interact with Stellar smart contracts reliably and efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;I just tried to work through the same process most developers would take when trying to get an RPC server deployed. That means walking through the process manually and verifying each step along the way.&lt;/p&gt;

&lt;p&gt;For developers who want to dive straight into the magic of their own projects without the complexities of infrastructure management, we recommend checking out OBSRVR.&lt;br&gt;
&lt;a href="https://www.withobsrvr.com" rel="noopener noreferrer"&gt;OBSRVR&lt;/a&gt; is an SCF (Stellar Community Fund) funded project designed to provide managed Soroban RPC services.&lt;/p&gt;

&lt;p&gt;Team: &lt;a href="https://dev.to/tillman_mosleyiii"&gt;tillman_mosleyiii&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>stellarchallenge</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
