<?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>Forem: Leon Nunes</title>
    <description>The latest articles on Forem by Leon Nunes (@mediocredevops).</description>
    <link>https://forem.com/mediocredevops</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%2F456748%2F7a6a7abd-e772-4c48-a2a3-ab3ac9cf4be2.jpg</url>
      <title>Forem: Leon Nunes</title>
      <link>https://forem.com/mediocredevops</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mediocredevops"/>
    <language>en</language>
    <item>
      <title>Let's deploy kgateway using vCluster</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Thu, 29 Jan 2026 14:53:43 +0000</pubDate>
      <link>https://forem.com/mediocredevops/lets-deploy-kgateway-using-vcluster-1e1n</link>
      <guid>https://forem.com/mediocredevops/lets-deploy-kgateway-using-vcluster-1e1n</guid>
      <description>&lt;h2&gt;
  
  
  Hey folks
&lt;/h2&gt;

&lt;p&gt;Been a while I've decided to once again start writing up some of the things I do, last year was a lot of travelling.&lt;/p&gt;

&lt;p&gt;Today I'm going to try installing &lt;a href="https://www.vcluster.com/docs/vcluster/#deploy-vcluster" rel="noopener noreferrer"&gt;Vcluster&lt;/a&gt; and then deploy &lt;a href="https://kgateway.dev/docs/envoy/latest/about/" rel="noopener noreferrer"&gt;Kgateway&lt;/a&gt; to it&lt;/p&gt;

&lt;h2&gt;
  
  
  What exactly is Vcluster?
&lt;/h2&gt;

&lt;p&gt;Taken straight from their docs&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;vCluster is an open source solution that enables teams to run virtual Kubernetes clusters inside existing infrastructure. It helps platform engineers create secure, isolated environments for development, testing, CI/CD, and even production workloads, without the cost or overhead of managing separate physical clusters.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This sounds fun, what challenges am I trying to solve for myself? Well I work with multiple customers in my day job and while I like creating multiple kind clusters for this it's not really that much fun when I need to switch contexts etc, let's see if I can achieve this with Vcluster.&lt;/p&gt;

&lt;p&gt;Their docs are pretty straightforward, so I'm gonna use Helm&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;helm upgrade &lt;span class="nt"&gt;--install&lt;/span&gt; vcluster-test  cluster &lt;span class="se"&gt;\&lt;/span&gt;
   &lt;span class="nt"&gt;--repo&lt;/span&gt; https://charts.loft.sh  &lt;span class="se"&gt;\&lt;/span&gt;
   &lt;span class="nt"&gt;--namespace&lt;/span&gt; products &lt;span class="se"&gt;\&lt;/span&gt;
   &lt;span class="nt"&gt;--repository-config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
   &lt;span class="nt"&gt;--create-namespace&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you run this you should see&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Release &lt;span class="s2"&gt;"vcluster-test"&lt;/span&gt; does not exist. Installing it now.
NAME: vcluster-test
LAST DEPLOYED: Thu Jan 29 18:52:02 2026
NAMESPACE: products
STATUS: deployed
REVISION: 1
TEST SUITE: None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next we will see how to setup something in this namespace, to begin with let's follow the sample guide &lt;a href="https://www.vcluster.com/docs/vcluster/manage/accessing-vcluster" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vcluster connect vcluster-test -n products
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This shows me&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;19:57:18 done vCluster is up and running
Forwarding from 127.0.0.1:10078 -&amp;gt; 8443
Forwarding from [::1]:10078 -&amp;gt; 8443
Handling connection for 10078
19:57:19 done Switched active kube context to vcluster_vcluster-test_products_gke
19:57:19 warn Since you are using port-forwarding to connect, you will need to leave this terminal open
- Use CTRL+C to return to your previous kube context
- Use `kubectl get namespaces` in another terminal to access the vcluster
Handling connection for 10078
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On another terminal I can now see I have new context with the following namespaces available&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get namespaces
NAME              STATUS   AGE
default           Active   63m
kube-node-lease   Active   63m
kube-public       Active   63m
kube-system       Active   63m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;As a user after this the docs doesn't seem to tell me where to go so I was kinda lost for a bit, there's something like deploy a sample app, seems like the notion is that I would use vCluster Platform(Not at the moment), let's go ahead with a sample deployment using helm and see what happens&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm going to install Kgateway&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Kgateway?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Kgateway is a control plane that implements the Kubernetes Gateway API for both microservices and AI workloads. The control plane translates your Kubernetes Gateway API resources into the configuration that the underlying data plane proxy can understand. The proxy layer is handled by kgateway’s implementation of Envoy for microservices workloads. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's begin with CRD's for Gateway API&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml
Warning: unrecognized format &lt;span class="s2"&gt;"int64"&lt;/span&gt;
Warning: unrecognized format &lt;span class="s2"&gt;"int32"&lt;/span&gt;
customresourcedefinition.apiextensions.k8s.io/backendtlspolicies.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/gatewayclasses.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/gateways.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/grpcroutes.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/httproutes.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/referencegrants.gateway.networking.k8s.io created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then our CRD's for Kgateway&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;helm upgrade &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="nt"&gt;--create-namespace&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--namespace&lt;/span&gt; kgateway-system &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--version&lt;/span&gt; 2.1.0 enterprise-kgateway-crds oci://us-docker.pkg.dev/solo-public/enterprise-kgateway/charts/enterprise-kgateway-crds

NAME: enterprise-kgateway-crds
LAST DEPLOYED: Thu Jan 29 20:11:51 2026
NAMESPACE: kgateway-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you &lt;span class="k"&gt;for &lt;/span&gt;installing the enterprise-kgateway-crds chart.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the Kgateway Installation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;helm upgrade &lt;span class="nt"&gt;-i&lt;/span&gt; enterprise-kgateway oci://us-docker.pkg.dev/solo-public/enterprise-kgateway/charts/enterprise-kgateway    &lt;span class="nt"&gt;-n&lt;/span&gt; kgateway-system    &lt;span class="nt"&gt;--version&lt;/span&gt; 2.1.0    &lt;span class="nt"&gt;--set&lt;/span&gt; licensing.licenseKey&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$GQ&lt;/span&gt; &lt;span class="nt"&gt;--create-namespace&lt;/span&gt;
Release &lt;span class="s2"&gt;"enterprise-kgateway"&lt;/span&gt; does not exist. Installing it now.
NAME: enterprise-kgateway
LAST DEPLOYED: Thu Jan 29 20:06:10 2026
NAMESPACE: kgateway-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you &lt;span class="k"&gt;for &lt;/span&gt;installing the enterprise-kgateway chart.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alright we have kgateway up and running now&lt;/p&gt;

&lt;p&gt;Lets deploy the &lt;a href="https://docs.solo.io/kgateway/2.1.x/install/sample-app/#deploy-app" rel="noopener noreferrer"&gt;sample app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we can go ahead and create the Gateway&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f- &amp;lt;&amp;lt;EOF
kind: Gateway
apiVersion: gateway.networking.k8s.io/v1
metadata:
  name: http
  namespace: kgateway-system
spec:
  gatewayClassName: enterprise-kgateway
  listeners:
  - protocol: HTTP
    port: 8080
    name: http
    allowedRoutes:
      namespaces:
        from: All
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that works&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get gateway http &lt;span class="nt"&gt;-n&lt;/span&gt; kgateway-system
NAME   CLASS                 ADDRESS   PROGRAMMED   AGE
http   enterprise-kgateway             True         11s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's expose this app on 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;kubectl apply -f- &amp;lt;&amp;lt;EOF
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: httpbin
  namespace: httpbin
spec:
  parentRefs:
    - name: http
      namespace: kgateway-system
  hostnames:
    - "www.example.com"
  rules:
    - backendRefs:
        - name: httpbin
          port: 8000
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now the final part sending a request&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -i localhost:8080/headers -H "host: www.example.com"
HTTP/1.1 200 OK
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json; encoding=utf-8
date: Thu, 29 Jan 2026 14:49:30 GMT
content-length: 442
x-envoy-upstream-service-time: 3
server: envoy

{
  "headers": {
    "Accept": [
      "*/*"
    ],
    "Host": [
      "www.example.com"
    ],
    "User-Agent": [
      "curl/8.18.0"
    ],
    "X-Envoy-Expected-Rq-Timeout-Ms": [
      "15000"
    ],
    "X-Envoy-External-Address": [
      "127.0.0.1"
    ],
    "X-Forwarded-For": [
      "10.124.3.10"
    ],
    "X-Forwarded-Proto": [
      "http"
    ],
    "X-Request-Id": [
      "c6575a96-59ba-4c7b-a433-beca541d6501"
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: I had to setup port-forwarding, ideally I think there's some settings to let the platform manage the LB IP handling but I need to check that&lt;/p&gt;

&lt;p&gt;That's it for this post, gotta try some more fun stuff with this now, maybe ArgoCD deployments and deploying Kgateway there&lt;/p&gt;

</description>
      <category>gke</category>
      <category>kubernetes</category>
      <category>gcp</category>
    </item>
    <item>
      <title>My homelab keeps dying :( should I move to cloud</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Thu, 30 Oct 2025 14:26:36 +0000</pubDate>
      <link>https://forem.com/mediocredevops/my-homelab-keeps-dying-should-i-move-to-cloud-2njl</link>
      <guid>https://forem.com/mediocredevops/my-homelab-keeps-dying-should-i-move-to-cloud-2njl</guid>
      <description>&lt;p&gt;These past two years, I've been a digital nomad, which means most of the times I'm not at home.&lt;/p&gt;

&lt;p&gt;Initially I had a homelab that was basically a powerhouse, and I used to run Proxmox on it, now when I was home, if anything used to go down I could quickly fix this.&lt;/p&gt;

&lt;p&gt;Over the years, I started using my homelab to do testing for customers etc, ofcourse no customer data is used here but replicating issues was pretty fast, AWS used to take a lot of time to create a cluster, and then I had to figure out IAM etc.&lt;/p&gt;

&lt;p&gt;But then my homelab kept going down, and I hate it now, my boxes were pretty robust and for some reason they keep going down and I can't go fix it because sometimes a simple restart doesn't fix it.&lt;/p&gt;

&lt;p&gt;So now I'm thinking if I should move back to the cloud :( which seems fun&lt;/p&gt;

&lt;p&gt;So over the next few weeks, I'll see if I can do something like spinning up some clusters in either some cloud envs or something like that.&lt;/p&gt;

</description>
      <category>infrastructure</category>
      <category>homelab</category>
    </item>
    <item>
      <title>Llama 4 is here, this is how you can try it!</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Mon, 07 Apr 2025 02:54:07 +0000</pubDate>
      <link>https://forem.com/mediocredevops/llama-4-is-here-this-is-how-you-can-try-it-1n7n</link>
      <guid>https://forem.com/mediocredevops/llama-4-is-here-this-is-how-you-can-try-it-1n7n</guid>
      <description>&lt;p&gt;Meta released their latest model series called LLAMA 4. It's an open-weight's model&lt;br&gt;
The herd consists of &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Llama Scout&lt;/li&gt;
&lt;li&gt;Llama Maverick&lt;/li&gt;
&lt;li&gt;Llama Behemoth&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can head over to the official release notes &lt;a href="https://ai.meta.com/blog/llama-4-multimodal-intelligence/" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The coolest part about these models are that they go up to 10M context windows, which means that they can read more data, even entire codebases, the Gemini 2.5 Pro that released recently has a 1M context window.&lt;/p&gt;

&lt;p&gt;You can try this for free on the OpenRouter page.&lt;/p&gt;

&lt;p&gt;Simply head over to &lt;a href="https://openrouter.ai/chat" rel="noopener noreferrer"&gt;https://openrouter.ai/chat&lt;/a&gt; Create your account. Enable this option. Under your Profile =&amp;gt; Settings =&amp;gt; Privacy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffux79hkx56q0rj99osrf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffux79hkx56q0rj99osrf.png" alt="Enable the privacy option " width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then when you go to chat add a model&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxswkk6gxr464lru0roe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxswkk6gxr464lru0roe.png" alt="Use the model" width="601" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The context sizes of this is lower than the original model, but you can wait for that when it releases with the full context size or use OpenRouter with the paid models.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>llama</category>
      <category>ai</category>
    </item>
    <item>
      <title>Testing out Gateway API using Gloo Gateway</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Mon, 31 Mar 2025 08:02:21 +0000</pubDate>
      <link>https://forem.com/mediocredevops/testing-out-gateway-api-using-gloo-gateway-4c63</link>
      <guid>https://forem.com/mediocredevops/testing-out-gateway-api-using-gloo-gateway-4c63</guid>
      <description>&lt;p&gt;Hey folks, been a while, I've been hearing a lot about the Gateway API for the past few months and it seems like the defacto for gateways now.&lt;/p&gt;

&lt;p&gt;Since we also implemented the Gateway API I thought why not test it out!&lt;/p&gt;

&lt;p&gt;So today I'll be testing Gloo Gateway which is an opensource API-Gateway based on the extremely performant envoy proxy. Our &lt;a href="https://docs.solo.io/gateway/latest/quickstart/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; takes you through this, but I'm going to also do something similar.&lt;/p&gt;

&lt;p&gt;To begin with we need to make sure we have the Kubernetes Gateway CR's in our cluster.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/standard-install.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use the above command to install it in your cluster. I use Talos to setup k8s on my end. You can also create a sample Talos cluster using &lt;a href="https://www.talos.dev/v1.9/talos-guides/install/local-platforms/docker/" rel="noopener noreferrer"&gt;docker&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Moving on we are going to use Helm to test things out. Here we're adding the Gloo Open Source Repository.&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 gloo https://storage.googleapis.com/solo-public-helm
helm repo update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we can install the helm chart using&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 -n gloo-system gloo gloo/gloo \
--create-namespace \
--version 1.18.13 \
-f -&amp;lt;&amp;lt;EOF
discovery:
  enabled: false
gatewayProxies:
  gatewayProxy:
    disabled: true
gloo:
  disableLeaderElection: true
kubeGateway:
  enabled: true
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see something 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;NAME: gloo
LAST DEPLOYED: Mon Mar 31 12:38:09 2025
NAMESPACE: gloo-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once we have this the &lt;code&gt;GatewayClass&lt;/code&gt; should be able to see Gloo Edge&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 gatewayclass gloo-gateway

NAME           CONTROLLER             ACCEPTED   AGE
gloo-gateway   solo.io/gloo-gateway   True       25m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have this let's create a Gateway&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-n&lt;/span&gt; gloo-system &lt;span class="nt"&gt;-f-&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
kind: Gateway
apiVersion: gateway.networking.k8s.io/v1
metadata:
  name: http
spec:
  gatewayClassName: gloo-gateway
  listeners:
  - protocol: HTTP
    port: 8080
    name: http
    allowedRoutes:
      namespaces:
        from: All
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once we apply this we can check if the gateway is now created.&lt;/p&gt;

&lt;p&gt;I also wanted to see how this looks by default, we have quite a lot of information here.&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;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gateway.networking.k8s.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Gateway&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;creationTimestamp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2025-03-31T07:21:45Z"&lt;/span&gt;
  &lt;span class="na"&gt;generation&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gloo-system&lt;/span&gt;
  &lt;span class="na"&gt;resourceVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;75078"&lt;/span&gt;
  &lt;span class="na"&gt;uid&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;68dfe16f-12ef-4bfc-b20a-0515826721be&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;gatewayClassName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gloo-gateway&lt;/span&gt;
  &lt;span class="na"&gt;listeners&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;allowedRoutes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;namespaces&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;All&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
    &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8080&lt;/span&gt;
    &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;HTTP&lt;/span&gt;
&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;conditions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;lastTransitionTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2025-03-31T07:21:45Z"&lt;/span&gt;
    &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
    &lt;span class="na"&gt;observedGeneration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Accepted&lt;/span&gt;
    &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;True"&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Accepted&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;lastTransitionTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2025-03-31T07:21:45Z"&lt;/span&gt;
    &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
    &lt;span class="na"&gt;observedGeneration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Programmed&lt;/span&gt;
    &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;True"&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Programmed&lt;/span&gt;
  &lt;span class="na"&gt;listeners&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;attachedRoutes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
    &lt;span class="na"&gt;conditions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;lastTransitionTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2025-03-31T07:21:45Z"&lt;/span&gt;
      &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
      &lt;span class="na"&gt;observedGeneration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
      &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Accepted&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;True"&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Accepted&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;lastTransitionTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2025-03-31T07:21:45Z"&lt;/span&gt;
      &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
      &lt;span class="na"&gt;observedGeneration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
      &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NoConflicts&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;False"&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Conflicted&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;lastTransitionTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2025-03-31T07:21:45Z"&lt;/span&gt;
      &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
      &lt;span class="na"&gt;observedGeneration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
      &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ResolvedRefs&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;True"&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ResolvedRefs&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;lastTransitionTime&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2025-03-31T07:21:45Z"&lt;/span&gt;
      &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
      &lt;span class="na"&gt;observedGeneration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
      &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Programmed&lt;/span&gt;
      &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;True"&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Programmed&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
    &lt;span class="na"&gt;supportedKinds&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gateway.networking.k8s.io&lt;/span&gt;
      &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;HTTPRoute&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now it's time to run some sample apps and test the gateway.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl create ns httpbin
kubectl -n httpbin apply -f https://raw.githubusercontent.com/solo-io/gloo-mesh-use-cases/main/policy-demo/httpbin.yaml
kubectl -n httpbin get pods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now in order to expose the application, we have to create a &lt;code&gt;HTTPRoute&lt;/code&gt; resource.&lt;/p&gt;

&lt;p&gt;By definition &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;HTTPRoute is a Gateway API type for specifying routing behavior of HTTP requests from a Gateway listener to an API object, i.e. Service.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So if we have a service we can route to it using the &lt;code&gt;HTTPRoute&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The specification of an HTTPRoute consists of:

ParentRefs- Define which Gateways this Route wants to be attached to.

Hostnames (optional)- Define a list of hostnames to use for matching the Host header of HTTP requests.

Rules- Define a list of rules to perform actions against matching HTTP requests. Each rule consists of matches, filters (optional), backendRefs (optional), timeouts (optional), and name (optional) fields.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;a href="https://gateway-api.sigs.k8s.io/api-types/httproute/" rel="noopener noreferrer"&gt;Taken from the official spec&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Back to our setup we can now setup the &lt;code&gt;HTTPRoute&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f- &amp;lt;&amp;lt;EOF
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: httpbin
  namespace: httpbin
  labels:
    example: httpbin-route
spec:
  parentRefs:
    - name: http
      namespace: gloo-system
  hostnames:
    - "www.example.com"
  rules:
    - backendRefs:
        - name: httpbin
          port: 8000
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can then check how this now looks 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;kubectl get -n httpbin httproute/httpbin -o yaml

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  creationTimestamp: "2025-03-31T07:44:46Z"
  generation: 1
  labels:
    example: httpbin-route
  name: httpbin
  namespace: httpbin
  resourceVersion: "76943"
  uid: e0f81d5a-7377-4bda-bae1-ce5f36031251
spec:
  hostnames:
    - www.example.com
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: http
      namespace: gloo-system
  rules:
    - backendRefs:
        - group: ""
          kind: Service
          name: httpbin
          port: 8000
          weight: 1
      matches:
        - path:
            type: PathPrefix
            value: /
status:
  parents:
    - conditions:
        - lastTransitionTime: "2025-03-31T07:44:47Z"
          message: ""
          observedGeneration: 1
          reason: Accepted
          status: "True"
          type: Accepted
        - lastTransitionTime: "2025-03-31T07:44:47Z"
          message: ""
          observedGeneration: 1
          reason: ResolvedRefs
          status: "True"
          type: ResolvedRefs
      controllerName: solo.io/gloo-gateway
      parentRef:
        group: gateway.networking.k8s.io
        kind: Gateway
        name: http
        namespace: gloo-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To test the gateway API we are now going to port-forward our setup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl port-forward deployment/gloo-proxy-http -n gloo-system 8080:8080
Forwarding from 127.0.0.1:8080 -&amp;gt; 8080
Forwarding from [::1]:8080 -&amp;gt; 8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And this works as expected&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -i localhost:8080/headers -H "host: www.example.com"
Handling connection for 8080
HTTP/1.1 200 OK
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: application/json; encoding=utf-8
date: Mon, 31 Mar 2025 07:48:28 GMT
content-length: 331
x-envoy-upstream-service-time: 0
server: envoy

{
  "headers": {
    "Accept": [
      "*/*"
    ],
    "Host": [
      "www.example.com"
    ],
    "User-Agent": [
      "curl/8.12.1"
    ],
    "X-Envoy-Expected-Rq-Timeout-Ms": [
      "15000"
    ],
    "X-Forwarded-Proto": [
      "http"
    ],
    "X-Request-Id": [
      "44449e3f-2442-4899-8238-0c2f70e1ee59"
    ]
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have the basic setup, let's try something extra with this. I like that using Gloo Gateway means that I can route to traffic that is anywhere&lt;/p&gt;

&lt;p&gt;Let's quickly try a &lt;a href="https://docs.solo.io/gateway/latest/traffic-management/destination-types/upstreams/static/" rel="noopener noreferrer"&gt;static upstream&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To create a Static Upstream we can do the following&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f- &amp;lt;&amp;lt;EOF
apiVersion: gloo.solo.io/v1
kind: Upstream
metadata:
  name: json-upstream
spec:
  static:
    hosts:
      - addr: jsonplaceholder.typicode.com
        port: 80
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then let's create a &lt;code&gt;RouteOption&lt;/code&gt;, basically you can attach &lt;code&gt;RouteOption&lt;/code&gt; to &lt;code&gt;HTTPRoute&lt;/code&gt; as a Filter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f- &amp;lt;&amp;lt;EOF
apiVersion: gateway.solo.io/v1
kind: RouteOption
metadata:
  name: rewrite
  namespace: default
spec:
  options:
    hostRewrite: 'jsonplaceholder.typicode.com'
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's also create a &lt;code&gt;HTTPRoute&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl apply -f- &amp;lt;&amp;lt;EOF
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: static-upstream
  namespace: default
spec:
  parentRefs:
  - name: http
    namespace: gloo-system
  hostnames:
    - static.example
  rules:
    - backendRefs:
      - name: json-upstream
        kind: Upstream
        group: gloo.solo.io
      filters:
      - type: ExtensionRef
        extensionRef:
          group: gateway.solo.io
          kind: RouteOption
          name: rewrite
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's check our &lt;code&gt;HTTPRoute&lt;/code&gt;&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 httproute -A
NAMESPACE   NAME              HOSTNAMES             AGE
default     static-upstream   ["static.example"]    11s
httpbin     httpbin           ["www.example.com"]   8m11s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -ik localhost:8080/posts -H "host: static.example:8080"
Handling connection for 8080
HTTP/1.1 200 OK
date: Mon, 31 Mar 2025 07:54:29 GMT
content-type: application/json; charset=utf-8
report-to: {"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1743243502&amp;amp;sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&amp;amp;s=geYoiMWFeqaCuv2HSvTjAatpMYLmT8EZc0f7Dd%2FnvDw%3D"}]}
reporting-endpoints: heroku-nel=https://nel.heroku.com/reports?ts=1743243502&amp;amp;sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&amp;amp;s=geYoiMWFeqaCuv2HSvTjAatpMYLmT8EZc0f7Dd%2FnvDw%3D
nel: {"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}
x-powered-by: Express
x-ratelimit-limit: 1000
x-ratelimit-remaining: 999
x-ratelimit-reset: 1743243543
vary: Origin, Accept-Encoding
access-control-allow-credentials: true
cache-control: max-age=43200
pragma: no-cache
expires: -1
x-content-type-options: nosniff
etag: W/"6b80-Ybsq/K6GwwqrYkAsFxqDXGC7DoM"
via: 1.1 vegur
cf-cache-status: HIT
age: 17
server: envoy
cf-ray: 928e476ddad0424e-BOM
alt-svc: h3=":443"; ma=86400
server-timing: cfL4;desc="?proto=TCP&amp;amp;rtt=1834&amp;amp;min_rtt=1834&amp;amp;rtt_var=917&amp;amp;sent=1&amp;amp;recv=3&amp;amp;lost=0&amp;amp;retrans=0&amp;amp;sent_bytes=0&amp;amp;recv_bytes=213&amp;amp;delivery_rate=0&amp;amp;cwnd=249&amp;amp;unsent_bytes=0&amp;amp;cid=0000000000000000&amp;amp;ts=0&amp;amp;x=0"
x-envoy-upstream-service-time: 16
transfer-encoding: chunked

[
  {
    "userId": 1,
    "id": 1,
    "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
    "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
  },

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And with that I would like to end this post, I will be testing this more, so I'll be posting about these.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>gatewayapi</category>
      <category>gloogatgeway</category>
    </item>
    <item>
      <title>Taking a Stroll down the Hypervisor Lane.</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Wed, 19 Feb 2025 14:13:16 +0000</pubDate>
      <link>https://forem.com/mediocredevops/taking-a-stroll-down-the-hypervisor-lane-59oo</link>
      <guid>https://forem.com/mediocredevops/taking-a-stroll-down-the-hypervisor-lane-59oo</guid>
      <description>&lt;p&gt;Been a while since I've sat down and written anything, mainly because I've been travelling and doing things that aren't complete yet.&lt;/p&gt;

&lt;p&gt;Today I want to talk about Hypervisors, I've always had a homelab and I used to self-host things on it like pihole along with DHCP for the users.&lt;/p&gt;

&lt;p&gt;The past two years things have been slow with my homelab, while I've been trying to figure out what's the best way to spin up VM's and destroy/create them as I wish, I've not quite perfected this because I keep getting stuck. But today let's talk about Hypervisors.&lt;/p&gt;

&lt;p&gt;The age of Kubernetes is upon us and slowly it's the age of AI too, but hypervisors have been around for a long time. Let me show y'all the one's I know of&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;KVM &lt;br&gt;
This has been my go-to on a bare-metal server using qemu to create machines as I go and while it's quite verbose during the early days it was how I used to spin up machines.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Proxmox&lt;br&gt;
This uses kvm under the hood to create VM's etc, has got good community support and is the defacto for bare-metal boxes these days, bonus points you can install whatever you like like K3s for example and still run this box as your hypervisor.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now I'd like to talk about the one's I've been playing with recently.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Xen-Orchestra&lt;br&gt;
While I'm currently reflashing this mainly because I forgot how I used to set it up and what the process was like in my lab. Currently XCP-NG is a really nice it gives you a simple UI, they recently also launched a new Go-based-Library that can be used via Terraform/OpenTofu too, which I'm eager to try out, IaC always bugs me because I cannot for the life of me complete a single deployment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Kubevirt/Firecracker/MicroVM's&lt;br&gt;
This is the final to-do list that I have, I want to get here but before that I need to get my IaC and a way to store information sorted out. This approach is a really cool approach in the sense that you can have host management now and add nodes that could be located anywhere.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Furthermore, I wonder if a service mesh added into the mix would add some more flavor to this.&lt;/p&gt;

&lt;p&gt;I had more thoughts on this but another side-quest has caught my attention, so I'm going to pursue that for now.&lt;/p&gt;

</description>
      <category>hypervisor</category>
      <category>devops</category>
    </item>
    <item>
      <title>How slow HDDs caused various issues in Talos and k3s</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Sun, 15 Sep 2024 06:11:53 +0000</pubDate>
      <link>https://forem.com/mediocredevops/how-slow-hdds-caused-various-issues-in-talos-and-k3s-4hib</link>
      <guid>https://forem.com/mediocredevops/how-slow-hdds-caused-various-issues-in-talos-and-k3s-4hib</guid>
      <description>&lt;p&gt;Hi there fellow people,&lt;/p&gt;

&lt;p&gt;It's been a while since I've come back here, I keep leaving this place to start my own blog but I never go through with it. Which sucks but it's alright.&lt;/p&gt;

&lt;p&gt;I'm still homelabbing although it's not completely where I would like it to be I'm trying.&lt;/p&gt;

&lt;p&gt;This weekend, I tried to get my Proxmox Cluster running with Talos linux. Somewhere down the line I added HDD's in my cluster, and then went ahead and built a Ceph Cluster with it. This was the first mistake :0&lt;/p&gt;

&lt;h4&gt;
  
  
  Mistakes happen.
&lt;/h4&gt;

&lt;p&gt;Yes, they do and it's a part of life, few days ago even my k3s cluster wasn't working correctly, while a VM I had did work exactly the way it was supposed to. It never hit me that I have HDDs because well I forgot&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExZGJvODk2d3U5YXQ0c3h4bnh2MzZva2Joc2ZzaXVocXB3dTF4dHM4YiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/GYVeKW8bQVXHDCcNOF/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExZGJvODk2d3U5YXQ0c3h4bnh2MzZva2Joc2ZzaXVocXB3dTF4dHM4YiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/GYVeKW8bQVXHDCcNOF/giphy.gif" width="634" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  How'd I fix it?
&lt;/h4&gt;

&lt;p&gt;Well I didn't, my friends at the Kargo Discord Server(We're building cool stuff there), pointed that the errors could be Disk I/O related. Bear in mind up until now I still was under the notion that I have SSDs.&lt;/p&gt;

&lt;p&gt;So What are these errors you talk about?&lt;/p&gt;

&lt;h4&gt;
  
  
  Timeouts, Timeouts and Timeouts :D
&lt;/h4&gt;

&lt;p&gt;I had containers failing with timeouts—a lot. ETCD was slow, Kube API server was slow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;E0912 18:33:33.703841       1 leaderelection.go:369] Failed to update lock: Put &lt;span class="s2"&gt;"https://127.0.0.1:7445/apis/coordination.k8s.io/v1/namespaces/kube-system/leases/kube-scheduler?timeout=5s"&lt;/span&gt;: net/http: request canceled &lt;span class="o"&gt;(&lt;/span&gt;Client.Timeout exceeded &lt;span class="k"&gt;while &lt;/span&gt;awaiting headers&lt;span class="o"&gt;)&lt;/span&gt;
E0912 18:33:38.701599       1 leaderelection.go:369] Failed to update lock: Put &lt;span class="s2"&gt;"https://127.0.0.1:7445/apis/coordination.k8s.io/v1/namespaces/kube-system/leases/kube-scheduler?timeout=5s"&lt;/span&gt;: context deadline exceeded
I0912 18:33:38.701663       1 leaderelection.go:285] failed to renew lease kube-system/kube-scheduler: timed out waiting &lt;span class="k"&gt;for &lt;/span&gt;the condition
E0912 18:33:42.475565       1 leaderelection.go:308] Failed to release lock: Operation cannot be fulfilled on leases.coordination.k8s.io &lt;span class="s2"&gt;"kube-scheduler"&lt;/span&gt;: the object has been modified&lt;span class="p"&gt;;&lt;/span&gt; please apply your changes to the latest version and try again
E0912 18:33:42.475595       1 server.go:242] &lt;span class="s2"&gt;"Leaderelection lost"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Kube-scheduler was dying too on Talos&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;E0913 08:34:02.257514       1 leaderelection.go:332] error retrieving resource lock kube-system/kube-scheduler: Get "https://127.0.0.1:7445/apis/coordination.k8s.io/v1/namespaces/kube-system/leases/kube-scheduler?timeout=5s": net/http: request canceled (Client.Timeout exceeded while awaiting headers)                                                                                                                      
E0913 08:34:07.256320       1 leaderelection.go:332] error retrieving resource lock kube-system/kube-scheduler: Get "https://127.0.0.1:7445/apis/coordination.k8s.io/v1/namespaces/kube-system/leases/kube-scheduler?timeout=5s": context deadline exceeded                                                                                                                                                                        
I0913 08:34:07.256364       1 leaderelection.go:285] failed to renew lease kube-system/kube-scheduler: timed out waiting for the condition                                                                        
E0913 08:34:09.375301       1 server.go:242] "Leaderelection lost"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looking at the Proxmox stats nothing stood out either &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxwn39j6sj026q4vznay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxwn39j6sj026q4vznay.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I checked with &lt;code&gt;dd&lt;/code&gt; too.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.60134 s, 671 MB/s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/ # dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=direct
1+0 records in
1+0 records out
1073741824 bytes (1.0GB) copied, 0.739437 seconds, 1.4GB/s
/ # dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=append
1+0 records in
1+0 records out
1073741824 bytes (1.0GB) copied, 0.487405 seconds, 2.1GB/s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  So what helped?
&lt;/h4&gt;

&lt;p&gt;Well the &lt;code&gt;fio&lt;/code&gt; tool is what helped me ultimately, but before that it was &lt;code&gt;apt&lt;/code&gt; when installing some packages.&lt;/p&gt;

&lt;p&gt;So with Talos, you can do something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl debug -n kube-system -it --image debian node/$NODE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is where I figured out okay something is really SLOOOOW&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;fio&lt;/code&gt; tool told me the tests will take 2 Hours, when the same on my laptop was within 10 seconds.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Apt&lt;/code&gt; was taking 20 minutes to install a package.&lt;/p&gt;

&lt;p&gt;So all in all yes slow disks, can cause all sorts of problems. Thank you for reading.&lt;/p&gt;

&lt;p&gt;Until Next time, if you'd like to talk more I'm &lt;a class="mentioned-user" href="https://dev.to/mediocredevops"&gt;@mediocredevops&lt;/a&gt;  on Twitter.&lt;/p&gt;

&lt;p&gt;References:&lt;br&gt;
Excellent Article here on &lt;a href="https://prog.world/is-storage-speed-suitable-for-etcd-ask-fio/" rel="noopener noreferrer"&gt;Etcd and Fio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>etcd</category>
      <category>k8s</category>
      <category>homelab</category>
      <category>devops</category>
    </item>
    <item>
      <title>Crowdstrike brings down Windows PC's</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Fri, 19 Jul 2024 08:57:46 +0000</pubDate>
      <link>https://forem.com/mediocredevops/crowdstrike-brings-down-windows-pcs-5fnm</link>
      <guid>https://forem.com/mediocredevops/crowdstrike-brings-down-windows-pcs-5fnm</guid>
      <description>&lt;p&gt;From the trenches of Twitter, I found out that windows has once again faced a global outage causing many systems to restart and enter a BSOD(Blue screen of Death).&lt;/p&gt;

&lt;p&gt;Many tweets have surfaced, which talk about multiple companies including Airlines going down.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fawhj9cljlwv41742a0ho.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fawhj9cljlwv41742a0ho.png" alt="Image description" width="777" height="716"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The fix given &lt;a href="https://x.com/mike_d_ok/status/1814187157562810388/photo/1" rel="noopener noreferrer"&gt;here&lt;/a&gt; isn't very beginner friendly and requires BIOS access which may not be something that is readily available.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2drahbfll25hbjos4eza.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2drahbfll25hbjos4eza.png" alt="Image description" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So if your company uses Crowdstrike and windows you basically have an off-day but not the IT folks :) &lt;/p&gt;

&lt;p&gt;It's a long weekend ahead, to get these resolved if Crowdstrike doesn't do it automatically.&lt;/p&gt;

&lt;p&gt;S&lt;/p&gt;

</description>
      <category>windows</category>
      <category>crowdstrike</category>
      <category>outage</category>
    </item>
    <item>
      <title>Streaming made simple</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Sat, 17 Feb 2024 13:05:40 +0000</pubDate>
      <link>https://forem.com/mediocredevops/streaming-meetups-made-simple-10l0</link>
      <guid>https://forem.com/mediocredevops/streaming-meetups-made-simple-10l0</guid>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;It's been a while(I don't know why this has started as an email). I've been busy with just life in general, but I'd like to resurrect this blog by adding a post about my streaming setup for meetups.&lt;/p&gt;

&lt;p&gt;In February 2024, I had my first hardware meetup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxcrz8yww8lm828722n39.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxcrz8yww8lm828722n39.png" alt="Hardware Meetup" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
We have a small community on &lt;a href="https://t.me/hardwaremum" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Side quests aside, this post is about my streaming setup.&lt;/p&gt;
&lt;h3&gt;
  
  
  The setup!
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Android Phone&lt;/li&gt;
&lt;li&gt;Linux Laptop/Windows(Hopefully Mac does too)&lt;/li&gt;
&lt;li&gt;IP webcam&lt;/li&gt;
&lt;li&gt;ADB installed.&lt;/li&gt;
&lt;li&gt;OBS for streaming.&lt;/li&gt;
&lt;li&gt;Stream destination(Youtube/Peertube/Twitch)&lt;/li&gt;
&lt;li&gt;Tripod&lt;/li&gt;
&lt;li&gt;Audio, either use a mic or just the sounds from the environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I like keeping things simple, yes this doesn't auto-track your speaker walking but that's okay!&lt;/p&gt;

&lt;p&gt;This is how it all looks when it's setup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssib2cmuua4a7l9v2hu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssib2cmuua4a7l9v2hu7.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The way I've setup this is from a reddit post that said that if you have adb installed you can do something like this once you have IP webcam on.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adb forward tcp:8081 tcp:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This eliminates the need for having your mobile connected to any network.&lt;/p&gt;

&lt;h2&gt;
  
  
  But how does this work?
&lt;/h2&gt;

&lt;p&gt;It's dead simple, first we start the IP webcam, then we do a adb port-forward. This sets up the android phone.&lt;/p&gt;

&lt;p&gt;Next, we do a very simple thing, in OBS we can add this as a media source, give the IP &lt;code&gt;http://localhost:8081/video&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgi68xfe7dywe39oytto4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgi68xfe7dywe39oytto4.png" alt="Image description" width="800" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once we have the media source, the next thing is to add the slides.&lt;/p&gt;

&lt;p&gt;This part is challenging, if your speaker has a way to connect directly with you via things like Zoom, Google Meet, this is the simplest way to do things.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxfwv47o1xprvbhad2qry.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxfwv47o1xprvbhad2qry.png" alt="Image description" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the end you have a simple setup that can help you get started streaming.&lt;/p&gt;

&lt;p&gt;This setup is also handy if you have a bad webcam or your laptop webcam doesn't look good, most android phones are capable of better image quality.&lt;/p&gt;

&lt;p&gt;While this setup is a bit janky it does the job.&lt;/p&gt;

&lt;p&gt;Until next time!&lt;/p&gt;

&lt;p&gt;Connect with me on &lt;a href="https://twitter.com/mediocreDevops" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/leon-nunes" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/p&gt;

</description>
      <category>streaming</category>
      <category>meetups</category>
      <category>mumbai</category>
      <category>obs</category>
    </item>
    <item>
      <title>How a simple Hang-up borked my lab environment.</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Thu, 05 Jan 2023 18:41:15 +0000</pubDate>
      <link>https://forem.com/mediocredevops/how-a-simple-reboot-borked-my-lab-environment-2jm7</link>
      <guid>https://forem.com/mediocredevops/how-a-simple-reboot-borked-my-lab-environment-2jm7</guid>
      <description>&lt;p&gt;Happy New Year! Well my new year hasn't been that happy, from falling sick on the first day of the year to my homelab giving up, life has just been going on...&lt;/p&gt;

&lt;p&gt;Upgrading never seemed risky until one day my Arch homelab(Yes I run Arch :o) hung up and caused all the kernels to get deleted. started getting funky GPG and corrupted package errors.&lt;/p&gt;

&lt;p&gt;It all began here...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpa2egbk03mw7rd33t6c1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpa2egbk03mw7rd33t6c1.png" alt="Linux failing to find the kernel" width="506" height="900"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I popped in a usb and started a live environment, mounted my folders and did &lt;code&gt;arch-chroot&lt;/code&gt;, then tried to do a &lt;code&gt;pacman -Syu&lt;/code&gt; only to get hit with a bunch of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: GPGME error: No data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So I thought let me just simply fix it by following the Arch guide, however, nothing worked, what did was&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo rm&lt;/span&gt; &lt;span class="nt"&gt;-fr&lt;/span&gt; /etc/pacman.d/gnupg
&lt;span class="nb"&gt;sudo &lt;/span&gt;pacman-key &lt;span class="nt"&gt;--init&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;pacman-key &lt;span class="nt"&gt;--populate&lt;/span&gt; archlinux manjaro
&lt;span class="nb"&gt;sudo &lt;/span&gt;pacman-key &lt;span class="nt"&gt;--refresh-keys&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also got few errors of files being already owned, since I was sleepy I did some bash-fu and ended up with no &lt;code&gt;/usr&lt;/code&gt; :D, fret not I copied it from my live system(Spoiler Alert: It borked up systemD). It worked until it didn't.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F60y3ufkrt1aeon9xj18m.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F60y3ufkrt1aeon9xj18m.gif" alt="Anna Kendrick doing Boom sign" width="500" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So then I figured out somehow that SystemD and QEMU was failing in some ways with Permission Denied errors and Qemu monitor getting a similar error, a quick reinstall fixed it...&lt;/p&gt;

&lt;p&gt;Weirdly this was a chain reaction... I booted up my PC and I kept getting an error that said I've overclocked it... but I never did that, this caused the bios to eventually wipe everything on every boot. Which means I couldn't run VMs because the Virtualization option never persisted.&lt;/p&gt;

&lt;p&gt;So I did the most sensible thing I replaced the CMOS battery, cause this is a really old system. Even then it still didn't work. Then I noticed that the Ram was showing up as 8GB, this system had 16GB ram and so it turned out that a faulty Memory stick brought my system down for 2 good days...&lt;/p&gt;

&lt;p&gt;Surprisingly, DDR3 is quite cheap so I'll be replacing that Ram Stick. &lt;/p&gt;

&lt;p&gt;That's it folks, I also got a new box to play around these days and I'm wondering what OS should I put on it any suggestions!?&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>learning</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Public speaking is hard and scary but it's also exciting!</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Sun, 31 Jul 2022 13:50:41 +0000</pubDate>
      <link>https://forem.com/mediocredevops/public-speaking-is-hard-and-scary-but-its-also-exciting-kof</link>
      <guid>https://forem.com/mediocredevops/public-speaking-is-hard-and-scary-but-its-also-exciting-kof</guid>
      <description>&lt;p&gt;If you've seen me on social media, almost after few days I ask people on how they find events, and I get no responses...&lt;/p&gt;

&lt;p&gt;Many a times I come across an event and then the Call for Proposals(CFP) has already passed, I have a lot of anxiety when it comes to Public Speaking and I get quite nervous, but I recently submitted a CFP in more than 5 places and got selected in two one was &lt;a href="https://youtu.be/EQd2C52sOCk" rel="noopener noreferrer"&gt;Hashicorp's Hashi Talks&lt;/a&gt;, the other &lt;a href="https://hopin.com/explore/organization/d9Rd0K6Z5TcgMomL3VK26hy2F" rel="noopener noreferrer"&gt;OpenInfra and CNCF Asia&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The blunder!
&lt;/h3&gt;

&lt;p&gt;I missed the HashiCorp Deadline because I never saw the email, Google Mail blunder. Luckily the HashiCorp team was okay with that  but then it hit me, I didn't actually have any experience in recording talks so the guidelines they suggested were the only things that could help me and I didn't have any slides!&lt;/p&gt;

&lt;p&gt;To be honest it was a very taxing weekend, because figuring out OBS studio was not very challenging but the equipment I had made it challenging!&lt;/p&gt;

&lt;h3&gt;
  
  
  Microphones are hard
&lt;/h3&gt;

&lt;p&gt;I thought I have a good webcam by Lenovo, which comes with dual mics. But for some reason these didn't work that great with OBS studio and I didn't have time to wait for a collar mic.&lt;br&gt;
So I had to use EasyEffects and somehow make the audio quality a bit good, didn't happen, I could still feel the choppiness.&lt;/p&gt;

&lt;h3&gt;
  
  
  My attention span is as short as a bulb.
&lt;/h3&gt;

&lt;p&gt;Truth be told, I don't really have a great attention span, so I wrote down the points to talk about, which I kept forgetting because I can't follow word to word without sounding like a robot.&lt;br&gt;
I never fixed this, it's quite present during the video.&lt;/p&gt;

&lt;h3&gt;
  
  
  My Anxiety and nervousness almost made me run away
&lt;/h3&gt;

&lt;p&gt;The moment I saw that I was accepted the immediate thought was to run away in the other direction! WHY? because I was scared, the thought of me recording a video was something I can never imagine,  people could've hated it and literally I would've been outed as a fraud, so many thoughts in my head but I was like whatever happens happens.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why am I writing this?
&lt;/h3&gt;

&lt;p&gt;Good question, I don't know either, somewhere I know there are people like me who are struggling and I want them to know that once you push through it things start to change. This is also a reminder to me of the things I have attempted so yay, here's to more learning and doing new and anxiety driven things.&lt;/p&gt;

&lt;h4&gt;
  
  
  Websites I used to find these Events.
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.meetup.com" rel="noopener noreferrer"&gt;Meetup.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sessionize.com/" rel="noopener noreferrer"&gt;Sessionize.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.papercall.io" rel="noopener noreferrer"&gt;Papercall.io&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>watercooler</category>
      <category>eventsinyourcity</category>
      <category>publicspeaking</category>
      <category>talk</category>
    </item>
    <item>
      <title>Ease your .tf debugging using Terraform console</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Tue, 31 May 2022 19:40:28 +0000</pubDate>
      <link>https://forem.com/mediocredevops/ease-your-tf-debugging-using-terraform-console-5fbm</link>
      <guid>https://forem.com/mediocredevops/ease-your-tf-debugging-using-terraform-console-5fbm</guid>
      <description>&lt;p&gt;&lt;a href="https://www.hashicorp.com/products/terraform" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt; is fun, it gives you the ability to quickly write code to deploy your infrastructure, but I've always found debugging terraform loops to be a little bit hard, this could be because I like to see what the result will be before hand and sometimes that's just not possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  So let's jump in!
&lt;/h2&gt;

&lt;p&gt;To begin, go to your terraform code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;terraform console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For starters we can view the data sent over from a data source&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; data.terraform_remote_state.network.outputs.public_subnets
[
  "subnet-03d91cba453ff08b1",
  "subnet-07f430834d2138353",
  "subnet-096e710748bab5eff",
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now if you want to create a loop out of something you can do&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; [for a in data.terraform_remote_state.network.outputs.public_subnets:upper(a)]

[
  "SUBNET-04D91CBA353F108B1",
  "SUBNET-07F030831D2358353",
  "SUBNET-096E710758CAB7EFF",
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One can also create structures to check the output for example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; {"${module.vpc.vpc_id}":[{"public":"${module.vpc.public_subnets}","private":"${module.vpc.private_subnets}"}]}
{
  "vpc-03cf041fb057a54f7" = [
    {
      "private" = [
        "subnet-07fcca0e214a4a439",
        "subnet-056496be722ef56d2",
        "subnet-04755007e91fe1e20",
      ]
      "public" = [
        "subnet-04d92cba4432f08b1",
        "subnet-07f030534d2c58353",
        "subnet-096e710648cab7eff",
      ]
    },
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it, you can also loop over data.&lt;/p&gt;

&lt;p&gt;Some things such as accessing &lt;code&gt;outputs&lt;/code&gt; is still not supported.&lt;/p&gt;

&lt;p&gt;If you liked this article I've also written one on &lt;a href="https://kubesimplify.com/best-practices-for-structuring-your-terraform-code" rel="noopener noreferrer"&gt;structuring Terraform code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For more information, &lt;a href="https://learn.hashicorp.com/tutorials/terraform/console" rel="noopener noreferrer"&gt;read the docs and follow the guide here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can also be found on &lt;a href="https://twitter.com/mediocreDevops" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/leon-nunes" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>terraform</category>
      <category>iac</category>
      <category>devops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Using Prowler to Audit your AWS account for vulnerabilities.</title>
      <dc:creator>Leon Nunes</dc:creator>
      <pubDate>Thu, 05 May 2022 15:35:58 +0000</pubDate>
      <link>https://forem.com/kcdchennai/using-prowler-to-audit-your-aws-account-for-vulnerabilities-4cp8</link>
      <guid>https://forem.com/kcdchennai/using-prowler-to-audit-your-aws-account-for-vulnerabilities-4cp8</guid>
      <description>&lt;p&gt;Few days ago I came across this &lt;a href="https://github.com/toniblyx/my-arsenal-of-aws-security-tools" rel="noopener noreferrer"&gt;repository&lt;/a&gt; and I found &lt;a href="https://github.com/prowler-cloud/prowler" rel="noopener noreferrer"&gt;Prowler&lt;/a&gt;(Go Star the repo).&lt;/p&gt;

&lt;h2&gt;
  
  
  So what is Prowler?
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Prowler is an Open Source security tool to perform AWS security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness. It contains more than 200 controls covering CIS, PCI-DSS, ISO27001, GDPR, HIPAA, FFIEC, SOC2, AWS FTR, ENS and custom security frameworks.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I was pretty amazed by the tool, the first time I ran it using podman I did have some issues because I had containerized aws-cli too, so I had to use environment variables and I also had to map the user as such&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;podman run --rm -it --user 0:0  --env AWS_ACCESS_KEY_ID=DEMO --env AWS_SECRET_ACCESS_KEY=Demo  -v $(pwd)/prowler_output:/prowler/output:z prowler  -f ap-south-1  -r ap-south-1  -M html,csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reporting part is also pretty cool, Prowler took about 35 minutes to run almost 217 checks in a single region.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6w0e3odapkfrecn78to1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6w0e3odapkfrecn78to1.png" alt="Prowler Checks" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Prowler there are a lot of things that can be further checked. I was able to see instances that had hardcoded secrets, there are checks done on Bucket Policy, IAM access, VPC routes and a lot more.&lt;/p&gt;

&lt;p&gt;Apart from this, it also, gives you the instance ID, and AWS support articles with possible fixes and remediation column to provide the details, you can output it to CSV and run filters to further get detailed info. It will also tell you why it is bad when it finds similar things. Prowler also guides you to enable additional security stuff.&lt;/p&gt;

&lt;p&gt;I'd definitely recommend this opensource tool to audit your AWS account to fix security issues.&lt;/p&gt;

&lt;p&gt;As always, if you find these articles interesting please leave a like.&lt;br&gt;
I'm also available for freelance Devops roles, my LinkedIn is in the Dev.to bio.&lt;/p&gt;

&lt;p&gt;For further discussions, please reach out &lt;a href="https://twitter.com/mediocreDevops" rel="noopener noreferrer"&gt;@mediocreDevops&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>kcdchennai</category>
      <category>devops</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
