WARNING! Your credentials are stored unencrypted in '/home/nutanix/.docker/config.json'. Configure a credential helper to remove this warning. See https://docs.docker.com/go/credential-store/
Login Succeeded
ติดตั้ง kubectl สำหรับเข้าถึง kubernetes
[nutanix@harbor nkp-v2.14.0]$ sudo 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
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 53.7M 100 53.7M 0 0 74.2M 0 --:--:-- --:--:-- --:--:-- 74.3M
[nutanix@harbor nkp-v2.14.0]$ sudo chmod +x /usr/local/bin/kubectl
[nutanix@harbor nkp]$ curl -o nkp-air-gapped-bundle_v2.14.0_linux_amd64.tar.gz "https://download.nutanix.com/downloads/nkp/v2.14.0/nkp-air-gapped-bundle_v2.14.0_linux_amd64.tar.gz?Expires=1751229414&Key-Pair-Id=APKAJTTNCWPEI42QKMSA&Signature=FPMLrX1BDFrqGfpMk6haH8TFwSoRkgMH27U9J6QtLO7kbldjss6UcIYtr0sngnT4AvxeX7j4T0B-1TsMXFgdNFyNpvycNCJEp1z-nG-7VcJfm9K2ZNdcsp-ZqLD42RuhRx~uS0UR7kw3ugwcxKgu9vcBNlDq1gh6VRVH8b9QtA6fp16DKQT6CiHyptVqqL-X1wRHPM7ti3LxMNaNhlrndF9D4v89ajxWfaNAICPRpbLjpLGxoviendqjd~sRd2ZsJUdKs6f78YMWCXHhGUH5Y0U38GwVFolQethXmQfvoDF5QvreOPKa6E1bZhQbVDcb3BfVqyPj0x-Zn7rl8Ww5wA__"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15.4G 100 15.4G 0 0 42.0M 0 0:06:17 0:06:17 --:--:-- 38.7M
Download Konvoy Image โดยการ Copy Download Link จาก nutanix portal
ขั้นตอนการ download จาก curl cli
[nutanix@harbor nkp]$ curl -o konvoy-image-bundle-v2.23.2_linux_amd64.tar.gz "https://download.nutanix.com/downloads/nkp/v2.14.0/konvoy-image-bundle-v2.22.2_linux_amd64.tar.gz?Expires=1751229375&Key-Pair-Id=APKAJTTNCWPEI42QKMSA&Signature=MvjKv3bi87AHpof4rmTgCoAmcR1qxs6y-y5C9Yhd7QvxJFDM8PuemyKdfV7hfObO5Q60e1vo9P9LPgI59gzCgrGa5OZp3df13d6N86drQpThuORkI7uD6LUMF30hqki9XEW8jDRIgn00QrTE3VWoD5KXfunoKCtLGlbDMSJt46w5pjspmFy0237qSobbgo9NfDOORnFiRqi8mBknrH122op8YzZ-kjk0zbHAFdSxouGRZBUEOXlqQ5MavLb9wzZq9PulvHCw9eDMx5L-TmYbXifMlyuh4TKvoqjRxKYCNh5ntPOYdSpgLsHN3Uh3YU1yW175fjsvZquK~YHRcjS~hw__"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 330M 100 330M 0 0 83.2M 0 0:00:03 0:00:03 --:--:-- 83.2M
File ที่ download จากขั้นต้น
[nutanix@harbor nkp]$ ll
total 16674272
-rw-r--r--. 1 nutanix nutanix 346426397 Jun 29 10:36 konvoy-image-bundle-v2.23.2_linux_amd64.tar.gz
-rw-r--r--. 1 nutanix nutanix 16633123312 Jun 29 10:43 nkp-air-gapped-bundle_v2.14.0_linux_amd64.tar.gz
สร้าง ssh key สำหรับ access VM ที่สร้างขึ้นโดยระบบ
[nutanix@harbor ~]$ ssh-keygen -t ed25519
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/nutanix/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/nutanix/.ssh/id_ed25519
Your public key has been saved in /home/nutanix/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256://XGZ4k3rrFq2BC+QWmPk3NJNt972vQ5vHrnSuOyTm0 nutanix@harbor.local
The key's randomart image is:
+--[ED25519 256]--+
| |
| |
| . |
| = + |
| S B + . |
| X + o . |
| @ ..E.+|
| o =.*o&X|
| .o=*XX%|
+----[SHA256]-----+
Performance: Ed25519 is significantly faster for both signing and verification operations. It uses elliptic curve cryptography which requires less computational overhead than RSA’s integer factorization approach.
Key size: Ed25519 uses 256-bit keys that provide security equivalent to 3072-bit RSA keys. This means much smaller key sizes for the same security level, reducing storage and transmission overhead.
Security design: Ed25519 was designed from the ground up to avoid many implementation pitfalls that have plagued RSA. It’s resistant to timing attacks, doesn’t require careful random number generation during signing (unlike RSA), and uses deterministic signatures.
Simplicity: The algorithm has fewer parameters and configuration options, reducing the chance of implementation errors. RSA requires choosing padding schemes, key sizes, and other parameters that can introduce vulnerabilities if done incorrectly.
Side-channel resistance: Ed25519 is designed to be resistant to side-channel attacks like timing and power analysis attacks, whereas RSA implementations often leak information through timing variations.
Future-proofing: While both are considered secure today, Ed25519’s elliptic curve foundation generally scales better as security requirements increase over time.
The main trade-off is that RSA is more widely supported in legacy systems, but for new applications, Ed25519 is generally the better choice due to its superior performance and security characteristics.
ติดตั้ง NKP ด้วย cli โดยจะต้อง export user และ password variable ก่อนจะ run nkp command
กรณีที่การติดตั้งสามารถ access internet ได้ไม่จำเป็นต้องใช้ option –airgapped และระบบจะทำการติดตั้งโดยใช้ค่า default ถ้าไม่ระบุใน cli เช่น ขนาดของ VM และจำนวน VM เช่น Control plane จำนวน 3 VMs และ Worker จำนวน 4 VMs ดังตัวอย่าง options อื่นๆ ดังนี้
𝗘𝗡𝗩𝗜𝗥𝗢𝗡𝗠𝗘𝗡𝗧 𝗩𝗔𝗥𝗜𝗔𝗕𝗟𝗘𝗦
export CLUSTER_NAME="wskn-mgmt-ag" # Name of the Kubernetes cluster
export NUTANIX_PC_FQDN_ENDPOINT_WITH_PORT="https://10.168.100.4:9440" # Nutanix Prism Central endpoint URL with port
export CONTROL_PLANE_IP="10.168.102.30" # IP address for the Kubernetes control plane
export IMAGE_NAME="nkp-rocky-9.4-release-1.29.6-20240816215147" # Name of the VM image to use for cluster nodes
export PRISM_ELEMENT_CLUSTER_NAME="wskn-nongpu" # Name of the Nutanix Prism Element cluster
export SUBNET_NAME="non-gpu-airgap" # Name of the subnet to use for cluster nodes
export PROJECT_NAME="default" # Name of the Nutanix project
export CONTROL_PLANE_REPLICAS="3" # Number of control plane replicas
export CONTROL_PLANE_VCPUS="4" # Number of vCPUs for control plane nodes
export CONTROL_PLANE_CORES_PER_VCPU="1" # Number of cores per vCPU for control plane nodes
export CONTROL_PLANE_MEMORY_GIB="16" # Memory in GiB for control plane nodes
export WORKER_REPLICAS="3" # Number of worker node replicas
export WORKER_VCPUS="8" # Number of vCPUs for worker nodes
export WORKER_CORES_PER_VCPU="1" # Number of cores per vCPU for worker nodes
export WORKER_MEMORY_GIB="32" # Memory in GiB for worker nodes
export NUTANIX_STORAGE_CONTAINER_NAME="default-container-xxx" # Name of the Nutanix storage container
export CSI_FILESYSTEM="ext4" # Filesystem type for CSI volumes
export CSI_HYPERVISOR_ATTACHED="true" # Whether to use hypervisor-attached volumes for CSI
export LB_IP_RANGE="10.168.102.31-10.168.102.31" # IP range for load balancer services
export SSH_KEY_FILE="/root/.ssh/id_rsa.pub" # Path to the SSH public key file
export NUTANIX_USER="admin" # Nutanix PrismCentral username (left blank for security)
export NUTANIX_PASSWORD="" # Nutanix PrismCentral password (left blank for security)
export REGISTRY_URL="https://registry.wskn-ag.local/library" # URL for the private container registry
export REGISTRY_USERNAME="admin" # Username for authenticating with the private registry (left blank for security)
export REGISTRY_PASSWORD="" # Password for authenticating with the private registry (left blank for security)
export REGISTRY_CA="/root/wskn-ag-certs/server.crt" # Path to the CA certificate for the private registry
𝗜𝗡𝗦𝗧𝗔𝗟𝗟𝗔𝗧𝗜𝗢𝗡 𝗖𝗢𝗠𝗠𝗔𝗡𝗗
nkp create cluster nutanix --cluster-name $CLUSTER_NAME \
--endpoint $NUTANIX_PC_FQDN_ENDPOINT_WITH_PORT\
--control-plane-endpoint-ip $CONTROL_PLANE_IP \
--control-plane-vm-image $IMAGE_NAME \
--control-plane-prism-element-cluster $PRISM_ELEMENT_CLUSTER_NAME \
--control-plane-subnets $SUBNET_NAME \
--control-plane-pc-project $PROJECT_NAME \
--control-plane-replicas $CONTROL_PLANE_REPLICAS \
--control-plane-vcpus $CONTROL_PLANE_VCPUS \
--control-plane-cores-per-vcpu $CONTROL_PLANE_CORES_PER_VCPU \
--control-plane-memory $CONTROL_PLANE_MEMORY_GIB \
--worker-vm-image $IMAGE_NAME \
--worker-prism-element-cluster $PRISM_ELEMENT_CLUSTER_NAME \
--worker-subnets $SUBNET_NAME \
--worker-pc-project $PROJECT_NAME \
--worker-replicas $WORKER_REPLICAS \
--worker-vcpus $WORKER_VCPUS \
--worker-cores-per-vcpu $WORKER_CORES_PER_VCPU \
--worker-memory $WORKER_MEMORY_GIB \
--ssh-public-key-file $SSH_KEY_FILE \
--csi-storage-container $NUTANIX_STORAGE_CONTAINER_NAME \
--csi-file-system $CSI_FILESYSTEM \
--csi-hypervisor-attached-volumes=$CSI_HYPERVISOR_ATTACHED \
--kubernetes-service-load-balancer-ip-range $LB_IP_RANGE \
--insecure \
--self-managed \
--airgapped \
--registry-mirror-url $REGISTRY_URL \
--registry-mirror-cacert $REGISTRY_CA \
--registry-mirror-username=$REGISTRY_USERNAME \
--registry-mirror-password=$REGISTRY_PASSWORD
Cluster default/nkp-at-next kubeconfig was written to to the filesystem.
You can now view resources in the new cluster by using the --kubeconfig flag with kubectl.
For example: kubectl --kubeconfig="/home/nutanix/nkp/nkp-v2.14.0/nkp-at-next.conf" get nodes
Starting kommander installation
✓ Deploying Flux
✓ Deploying Ingress certificate
✓ Creating kommander-overrides ConfigMap
✓ Deploying Git Operator
✓ Creating GitClaim for management GitRepository
✓ Creating GitClaimUser for accessing management GitRepository
✓ Configuring HelmRepositories for airgapped environment
✓ Deploying Flux configuration
✓ Deploying Kommander Operator
✓ Creating KommanderCore resource
✓ Cleaning up kommander bootstrap resources
Got a Retry-After 1s response for attempt 1 to https://10.55.10.10:6443/apis/dkp.d2iq.io/v1alpha1/kommandercores?watch=true
✓ Deploying ChartMuseum
✓ Deploying Gatekeeper
✓ Deploying Kommander AppManagement
✓ Creating Core AppDeployments
✓ 4 out of 13 core applications have been installed (waiting for dex, dex-k8s-authenticator and 7 more)
✓ 6 out of 13 core applications have been installed (waiting for dex-k8s-authenticator, kommander and 5 more)
✓ 7 out of 13 core applications have been installed (waiting for dex-k8s-authenticator, kommander and 4 more)
✓ 8 out of 13 core applications have been installed (waiting for dex-k8s-authenticator, kommander and 3 more)
✓ 9 out of 13 core applications have been installed (waiting for dex-k8s-authenticator, kommander-ui and 2 more)
✓ 10 out of 13 core applications have been installed (waiting for dex-k8s-authenticator, kubefed and 1 more)
✓ 11 out of 13 core applications have been installed (waiting for dex-k8s-authenticator, traefik-forward-auth-mgmt)
✓ 12 out of 13 core applications have been installed (waiting for traefik-forward-auth-mgmt)
✓ Creating cluster-admin credentials
Cluster was created successfully! Get the dashboard details with:
nkp get dashboard --kubeconfig="/home/nutanix/nkp/nkp-v2.14.0/nkp-at-next.conf"
[nutanix@harbor harbor]$ docker login 10.55.10.75
Username: admin
Password:
WARNING! Your credentials are stored unencrypted in '/home/nutanix/.docker/config.json'.
Configure a credential helper to remove this warning. See
https://docs.docker.com/go/credential-store/
Login Succeeded