{"id":20648239,"url":"https://github.com/nutanixdev/nkp-quickstart","last_synced_at":"2025-04-16T14:42:05.056Z","repository":{"id":256530024,"uuid":"855617867","full_name":"nutanixdev/nkp-quickstart","owner":"nutanixdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-20T08:03:55.000Z","size":148,"stargazers_count":8,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T05:23:53.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nutanixdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-11T07:06:39.000Z","updated_at":"2025-03-05T05:56:47.000Z","dependencies_parsed_at":"2024-12-20T09:30:01.013Z","dependency_job_id":null,"html_url":"https://github.com/nutanixdev/nkp-quickstart","commit_stats":null,"previous_names":["nutanixdev/nkp-quickstart"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nutanixdev%2Fnkp-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nutanixdev%2Fnkp-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nutanixdev%2Fnkp-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nutanixdev%2Fnkp-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nutanixdev","download_url":"https://codeload.github.com/nutanixdev/nkp-quickstart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249251060,"owners_count":21237965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T17:07:17.710Z","updated_at":"2025-04-16T14:42:05.046Z","avatar_url":"https://github.com/nutanixdev.png","language":"Shell","readme":"# Nutanix Kubernetes Platform - Quickstart Guide\n\n## TL;DR\n\nSteps to install all the required CLIs (nkp, kubectl and helm) to create and manage NKP clusters.\n\n1. Add NKP Rocky Linux image from the Nutanix Support Portal to Prism Central\n\n1. Create a jump host with 4 vCPUs, 8 GB memory, use the Rocky image (update disk to 128 GiB), and the following Cloud-init custom script\n\n    ```yaml\n    #cloud-config\n    ssh_pwauth: true\n    chpasswd:\n      expire: false\n      users:\n      - name: nutanix\n        password: nutanix/4u # Recommended to change the password or update the script to use SSH keys\n        type: text\n    bootcmd:\n    - mkdir -p /etc/docker\n    write_files:\n    - content: |\n        {\n            \"insecure-registries\": [\"registry.nutanixdemo.com\"]\n        }\n      path: /etc/docker/daemon.json\n    runcmd:\n    - '[ ! -f \"/etc/yum.repos.d/nutanix_rocky9.repo\" ] || mv -f /etc/yum.repos.d/nutanix_rocky9.repo /etc/yum.repos.d/nutanix_rocky9.repo.disabled'\n    - dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo\n    - dnf -y install docker-ce docker-ce-cli containerd.io\n    - systemctl --now enable docker\n    - usermod -aG docker nutanix\n    - 'curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl'\n    - chmod +x /usr/local/bin/kubectl\n    - 'curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash'\n    - eject\n    - 'wall \"If you are seeing this message, please reconnect your SSH session. Otherwise, the NKP CLI installation process may fail.\"'\n    final_message: \"The machine is ready after $UPTIME seconds. Go ahead and install the NKP CLI using: $ curl -sL https://raw.githubusercontent.com/nutanixdev/nkp-quickstart/main/scripts/get-nkp-cli | bash\"\n    ```\n\n1. SSH to `nutanix@\u003cjump host_IP\u003e` (default password: nutanix/4u)\n\n1. Install the NKP CLI with the command:\n\n    ```shell\n    curl -fsSL https://raw.githubusercontent.com/nutanixdev/nkp-quickstart/main/scripts/get-nkp-cli | bash\n    ```\n\n    When prompted, you must use the download link as-is, which is available in the Nutanix portal.\n\n## Table of Contents\n\n1. [Overview](#overview)\n\n1. [Prerequisites Checklist](#prerequisites-checklist)\n\n1. [Deploy Linux jump host](#deploy-linux-jump-host)\n\n1. [Install NKP CLI](#install-nkp-cli)\n\n1. [(Optional) Create NKP Cluster on Nutanix](#optional-create-nkp-cluster-on-nutanix)\n\n## Overview\n\nThe NKP CLI is a command-line interface for managing NKP-based workflows. This guide provides a quick and easy way to install the required CLIs (nkp, kubectl and helm) using the Rocky Linux image provided by Nutanix in the [Nutanix Support Portal](https://portal.nutanix.com/page/downloads?product=nkp).\n\n## Prerequisites Checklist\n\nFor NKP CLI:\n\n- Internet connectivity\n- Add NKP Rocky Linux to Prism Central. **DO NOT CHANGE** the auto-populated image name\n\n    \u003cdetails\u003e\n    \u003csummary\u003eclick to view example\u003c/summary\u003e\n    \u003cIMG src=\"./images/add_nkp_rocky_os_image.png\" atl=\"Add NKP Rocky OS image\" /\u003e\n    \u003c/details\u003e\n\n(Optional) For NKP cluster creation:\n\n- Static IP address for the control plane VIP\n- One or more IP addresses for the NKP dashboard and load balancing service\n\n## Deploy Linux jump host\n\n1. Connect to Prism Central\n\n1. Create a virtual machine\n\n    - Name: nkp-jump host\n    - vCPUs: 2\n    - Memory: 4\n    - Disk: Clone from Image (select the Rocky Linux you previously uploaded)\n    - Disk Capacity: 128 (default is 20)\n    - Guest Customization: Cloud-init (Linux)\n    - Custom Script:\n\n        ```yaml\n        #cloud-config\n        ssh_pwauth: true\n        chpasswd:\n          expire: false\n          users:\n          - name: nutanix\n            password: nutanix/4u # Recommended to change the password or update the script to use SSH keys\n            type: text\n        bootcmd:\n        - mkdir -p /etc/docker\n        write_files:\n        - content: |\n            {\n                \"insecure-registries\": [\"registry.nutanixdemo.com\"]\n            }\n          path: /etc/docker/daemon.json\n        runcmd:\n        - '[ ! -f \"/etc/yum.repos.d/nutanix_rocky9.repo\" ] || mv -f /etc/yum.repos.d/nutanix_rocky9.repo /etc/yum.repos.d/nutanix_rocky9.repo.disabled'\n        - dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo\n        - dnf -y install docker-ce docker-ce-cli containerd.io\n        - systemctl --now enable docker\n        - usermod -aG docker nutanix\n        - 'curl -Lo /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl'\n        - chmod +x /usr/local/bin/kubectl\n        - 'curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash'\n        - eject\n        - 'wall \"If you are seeing this message, please reconnect your SSH session. Otherwise, the NKP CLI installation process may fail.\"'\n        final_message: \"The machine is ready after $UPTIME seconds. Go ahead and install the NKP CLI using: $ curl -sL https://raw.githubusercontent.com/nutanixdev/nkp-quickstart/main/scripts/get-nkp-cli | bash\"\n        ```\n\n    \u003cdetails\u003e\n    \u003csummary\u003eclick to view example\u003c/summary\u003e\n    \u003cIMG src=\"./images/create_vm_summary.png\" atl=\"Create VM summary\" /\u003e\n    \u003c/details\u003e\n\n1. Power on the virtual machine\n\n## Install NKP CLI\n\n1. Connect to your jump host using SSH (default password: nutanix/4u)\n\n    ```shell\n    ssh nutanix@\u003cjump host_IP\u003e\n    ```\n\n1. Install the NKP CLI with the command:\n\n    ```shell\n    curl -fsSL https://raw.githubusercontent.com/nutanixdev/nkp-quickstart/main/scripts/get-nkp-cli | bash\n    ```\n\n    When prompted, you must use the download link as-is, which is available in the Nutanix portal.\n\n## (Optional) Create NKP cluster on Nutanix\n\n1. Before you start, ensure you meet the prerequisites:\n\n    - Static IP address for the control plane VIP\n    - One or more IP addresses for the NKP dashboard and load-balancing service\n\n    Note: The IP addresses must be in the same subnet as the virtual machines.\n\n1. Choose one of the following two installation methods:\n\n    - **Prompt-based installation**. Use this method when the Internet connection for the NKP cluster isn’t shared with more users.\n    - **CLI installation**. Use this method when the Internet connection for the NKP cluster is shared between many users.\n\n### Prompt-based installation\n\nThis installation method gives less control on the cluster configuration. For example, the NKP cluster will be created with three control plane nodes and four worker nodes.\n\n```shell\nnkp create cluster nutanix\n```\n\n### CLI installation\n\nThis installation method lets you fully customize your cluster configuration. The following commands create a cluster with one control plane node and three worker nodes.\n\n1. Before running the following command in your jump host VM, update the values with your environment:\n\n    ```shell\n    export NKP_VERSION=2.12.0                                       # NKP version to install\n    export CLUSTER_NAME=nkp                                         # NKP cluster name. When using NKP Pro/Ultimate, this name is used to generate the license key\n    export NUTANIX_USER=admin                                       # Prism Central username\n    export NUTANIX_PASSWORD=''                                      # Keep the password enclosed between single quotes - Ex: 'password'\n    export NUTANIX_ENDPOINT=                                        # Prism Central IP address\n    export NUTANIX_PORT=9440                                        # Prism Central port (default: 9440)\n    export LB_IP_RANGE=                                             # Load balancer IP range - Ex: 10.42.236.204-10.42.236.204\n    export CONTROL_PLANE_ENDPOINT_IP=                               # Kubernetes VIP. Must be in the same subnet as the VMs - Ex: 10.42.236.203\n    export NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME=nkp-rocky-9.4-release-1.29.6-20240816215147.qcow2 # Update with the NKP Rocky image name\n    export NUTANIX_PRISM_ELEMENT_CLUSTER_NAME=                      # Prism Element cluster name - Ex: PHX-POC207\n    export NUTANIX_SUBNET_NAME=                                     # Ex: primary\n    export NUTANIX_STORAGE_CONTAINER_NAME=SelfServiceContainer      # Change to your preferred Prism storage container\n    export REGISTRY_MIRROR_URL=registry.nutanixdemo.com/docker.io   # Required on Nutanix HPOC\n    ```\n\n1. The next command will start the installation process of an NKP management cluster:\n\n    ```shell\n    nkp create cluster nutanix -c $CLUSTER_NAME \\\n        --kind-cluster-image $REGISTRY_MIRROR_URL/mesosphere/konvoy-bootstrap:v$NKP_VERSION \\\n        --endpoint https://$NUTANIX_ENDPOINT:$NUTANIX_PORT \\\n        --insecure \\\n        --kubernetes-service-load-balancer-ip-range $LB_IP_RANGE \\\n        --control-plane-endpoint-ip $CONTROL_PLANE_ENDPOINT_IP \\\n        --control-plane-vm-image $NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME \\\n        --control-plane-prism-element-cluster $NUTANIX_PRISM_ELEMENT_CLUSTER_NAME \\\n        --control-plane-subnets $NUTANIX_SUBNET_NAME \\\n        --control-plane-replicas 1 \\\n        --worker-vm-image $NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME \\\n        --worker-prism-element-cluster $NUTANIX_PRISM_ELEMENT_CLUSTER_NAME \\\n        --worker-subnets $NUTANIX_SUBNET_NAME \\\n        --worker-replicas 3 \\\n        --csi-storage-container $NUTANIX_STORAGE_CONTAINER_NAME \\\n        --registry-mirror-url http://$REGISTRY_MIRROR_URL \\\n        --self-managed\n    ```\n\n## Support and Disclaimer\n\nThese code samples are intended as standalone examples. Please be aware that all public code samples provided by Nutanix are unofficial in nature, are provided as examples only, are unsupported, and will need to be heavily scrutinized and potentially modified before they can be used in a production environment. All such code samples are provided on an as-is basis, and Nutanix expressly disclaims all warranties, express or implied. All code samples are © Nutanix, Inc., and are provided as-is under the MIT license (\u003chttps://opensource.org/licenses/MIT\u003e).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnutanixdev%2Fnkp-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnutanixdev%2Fnkp-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnutanixdev%2Fnkp-quickstart/lists"}