Skip to content

Instantly share code, notes, and snippets.

export URL="https://${PCIPADDRESS}:9440/karbon"
export PCADMIN="username"
export PCPASSWD='supersecretpassword'
export CLUSTER_UUID="uuid of cluster to remove"
export APIURL="/v1-alpha.1/k8s/cluster-registrations/${CLUSTER_UUID}?force=true"
curl -s -k -u "$PCADMIN:$PCPASSWD" --header 'accept: application/json' --request DELETE ${URL}${APIURL}
@ryandotclair
ryandotclair / pp-csi-block-storageclass.yaml
Created June 3, 2026 22:45
Pre-Provision CSI Driver Block Storage StoragClass
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nutanix-volume
parameters:
csi.storage.k8s.io/fstype: ext4
storageContainer: SelfServiceContainer
prismElementRef: 00077777-aaaa-3333-ffff-0066666eeeee
storageType: NutanixVolumes
@ryandotclair
ryandotclair / excalidraw-mcp-nai-2.7.md
Created June 2, 2026 01:37
Excalidraw MCP Server on NAI

Overview

Nutanix Enterprise AI 2.7 allows running MCP servers locally. These instructions allow you to build the excalidraw MCP server into a container, and deploy it on NAI.

Build it locally

  1. Clone the repo
git clone https://github.com/excalidraw/excalidraw-mcp.git
@ryandotclair
ryandotclair / autogrow-lvs.md
Created May 22, 2026 22:53
LVM Autogrow Script

Below is an example of an auto-grow LVM script, where it automatically grows a logical volume when free storage is observed.

Credit: Winson (thanks!)

sudo tee /usr/local/sbin/autogrow-lvs.sh > /dev/null <<'EOF'
#!/bin/bash
set -euo pipefail
VG=vg0

# Find the PV device
@ryandotclair
ryandotclair / push-images-to-registry.sh
Created May 22, 2026 18:08
Podman NAI Retag Script
#!/bin/bash
#
# NAI Images - Load, Retag, and Push to Private Registry
#
# This script loads NAI container images from a tar bundle, retags them for your
# private registry (self-signed cert), and pushes them to the registry.
#
# Prerequisites:
# - Podman installed and running

Before You Begin / Assumed

  • 1× Jumpbox (has kubectl access to NKP management cluster)
  • 1x Existing NKP Management Cluster
  • 7 preprovisioned servers: 3 control plane nodes, 4 worker nodes
    • IMPORTANT note: all 7 should have different hostnames set, and /etc/hosts file updated to reflect 127.0.0.1 to that hostname.
  • If preprovision nodes are VM's, highly recommend adding an auto-grow script for LVM (example)
  • If network firewall is involved, ensure proper ports are open.
  • Instructions assumes Ubuntu 24.04 LTS installed on all nodes
  • Static IP addresses configured (for VIP and MetalLB)
  • SSH access configured on all nodes
@ryandotclair
ryandotclair / Harbor Preheat + Dragonfly Setup.md
Last active April 29, 2026 13:44
Harbor Preheat + Dragonfly Setup

Problem Statement

If you have large container images or remote sites that have limited network connectivity, pulling images can take a long time--and in many cases requires being pulled for every Worker Node your workload gets deployed on.

One possible solution is leveraging Harbor's Preheat feature, where upon a container being pushed to the registry it will send the image to the Dragonfly running on the cluster ahead of time. So when a Pod gets spun up, it can leverage local P2P technology to pull the image to the local Worker Node instead of going to Harbor.

Note: For situations were you have many clusters at a site, and want to minimize WAN traffic futher, you can alternatively set up a Replication pair of Harbor (so there's a local copy to the site), and then from the Remote Site Harbor set up preheat to the local Dragonflies. This, however, is out of scope for this guide.

Disclaim

The usual don't trust what random

@ryandotclair
ryandotclair / gpu-operator-overrides-2.17.1.yaml
Created April 8, 2026 19:20
GPU Operator overrides (2.17.1)
driver:
enabled: true
usePrecompiled: true
version: 580
@ryandotclair
ryandotclair / curl-test-s3-object.sh
Last active March 30, 2026 13:20
Object simple test
# 1. Configuration
ACCESS_KEY="your-key"
SECRET_KEY="your-secret"
ENDPOINT="example.com"
BUCKET="test-bucket"
FILE="upload-test.txt" # The name of the file ALREADY in the bucket
LOCAL_TARGET="downloaded_file.txt"
# 2. Signature Setup (Method is now GET)
date_value=$(date -R)

Overview

This covers how to install NAI 2.6 on NKP with Tech Preview features enabled.

Going through UI as of this writing only supports the non-Tech Preview install.

These instructions will require your docker private token which can be generated here: https://portal.nutanix.com/page/downloads?product=nai.

Install Dependencies