### Install Neterial CLI Source: https://github.com/neterialio/new-docs/blob/main/getting-started.md Installs the Neterial command-line interface by downloading and executing a bash script from the official source. This is the first step to managing Neterial resources via the CLI. ```sh curl -sSL https://get.neterial.io/cli.sh | bash ``` -------------------------------- ### Verify Ingress-nginx Pods Source: https://github.com/neterialio/new-docs/blob/main/Guides/ingress-nginx.md Checks the status of all pods running within the 'ingress-nginx' namespace to ensure the controller components have started correctly. ```bash kubectl get pods --namespace ingress-nginx ``` -------------------------------- ### Get Neterial Kubernetes Clusters Source: https://github.com/neterialio/new-docs/blob/main/getting-started.md Retrieves a list of all Kubernetes clusters managed by Neterial. The output includes cluster name, status, provider, location, age, and Kubernetes version. ```sh neterial kube get clusters ``` ```console NAME STATUS PROVIDER LOCATION AGE VERSION default Ready Hetzner Cloud hel1 5 minutes 1.32 ``` -------------------------------- ### Install Ingress-nginx with Helm Source: https://github.com/neterialio/new-docs/blob/main/Guides/ingress-nginx.md Installs the ingress-nginx controller using Helm, specifying the target namespace and applying a custom values file for configuration. This command deploys the controller with the settings defined in values.yaml. ```bash helm install ingress-nginx ingress-nginx/ingress-nginx \ --namespace ingress-nginx \ -f values.yaml ``` -------------------------------- ### Kubernetes Ingress Resource Example Source: https://github.com/neterialio/new-docs/blob/main/Guides/ingress-nginx.md An example of a Kubernetes Ingress resource definition. It specifies routing rules for incoming traffic, mapping hostnames and paths to backend services within the cluster. The 'ingressClassName: nginx' field directs traffic to the ingress-nginx controller. ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: example-ingress namespace: your-app-namespace spec: ingressClassName: nginx rules: - host: example.com http: paths: - path: / pathType: Prefix backend: service: name: your-service port: number: 80 ``` -------------------------------- ### Login to Neterial CLI Source: https://github.com/neterialio/new-docs/blob/main/getting-started.md Authenticates the user with the Neterial service using the CLI. This command initiates the login process, typically requiring user credentials or an API key. ```sh neterial auth login ``` -------------------------------- ### Set Kubernetes Context and Get Nodes Source: https://github.com/neterialio/new-docs/blob/main/getting-started.md Configures the local kubectl client to use the Neterial-managed Kubernetes cluster context and then lists the nodes within the cluster. This verifies successful cluster access and operation. ```sh kubectl config use-context default-neterial-admin@default-neterial kubectl get nodes ``` ```console NAME STATUS ROLES AGE VERSION nks-default-ctl-1d39beb8 Ready control-plane 9m39s v1.32.3 nks-default-wrk-5a451893 Ready 8m35s v1.32.3 ``` -------------------------------- ### Install Cert Manager Source: https://github.com/neterialio/new-docs/blob/main/Guides/cert-manager.md Applies the main CertManager installation manifest using kubectl. This command installs the necessary Kubernetes resources, including namespaces, service accounts, roles, deployments, and webhook configurations. The output indicates the status of these resource creations. ```sh kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.2/cert-manager.yaml ``` -------------------------------- ### Create Neterial Kubernetes Cluster Source: https://github.com/neterialio/new-docs/blob/main/getting-started.md Creates a new Kubernetes cluster managed by Neterial. Users must specify the cloud provider (e.g., 'hcloud' for Hetzner Cloud, 'aws' for AWS) where the cluster will be provisioned. ```sh neterial kube create cluster --cloud [PROVIDER] ``` -------------------------------- ### Initialize Neterial CLI (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Runs the Neterial CLI to log in or sign up and discover available cloud services. This is typically the first command to run after installation. ```sh neterial init ``` -------------------------------- ### List Connected Cloud Providers Source: https://github.com/neterialio/new-docs/blob/main/getting-started.md Displays a list of cloud providers that have been connected to Neterial. It shows their connection status and the last update time, helping to verify successful integration. ```sh neterial provider list ``` ```console NAME STATUS LAST_UPDATE AWS Uninitialized Hetzner Cloud Ready 2 seconds ``` -------------------------------- ### Ingress-nginx Helm Values Configuration Source: https://github.com/neterialio/new-docs/blob/main/Guides/ingress-nginx.md A custom values.yaml file to configure the ingress-nginx Helm chart. This example sets the service type to LoadBalancer and specifies Hetzner Cloud annotations for load balancer placement. ```yaml controller: service: type: LoadBalancer externalTrafficPolicy: Local annotations: load-balancer.hetzner.cloud/location: hel1 ``` -------------------------------- ### Create Ingress-nginx Namespace Source: https://github.com/neterialio/new-docs/blob/main/Guides/ingress-nginx.md Creates a dedicated Kubernetes namespace named 'ingress-nginx' to host the ingress-nginx controller components. This is an optional but recommended step for better organization. ```bash kubectl create namespace ingress-nginx ``` -------------------------------- ### Install Issuer Configuration Source: https://github.com/neterialio/new-docs/blob/main/Guides/cert-manager.md This command applies the Issuer configuration defined in the 'issuer.yaml' file to the Kubernetes cluster. Ensure the 'issuer.yaml' file is in the current directory or provide the correct path. ```sh kubectl apply -f issuer.yaml ``` -------------------------------- ### Install Neterial CLI (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Installs the Neterial CLI using a shell script. This method is suitable for Linux, macOS, and Windows WSL environments. Ensure you have curl installed. ```sh curl -sSL https://get.neterial.io/cli.sh | bash ``` -------------------------------- ### Apply Kubernetes Ingress Resource Source: https://github.com/neterialio/new-docs/blob/main/Guides/ingress-nginx.md Applies a Kubernetes Ingress resource definition from a YAML file to the cluster, enabling traffic routing for applications managed by ingress-nginx. ```bash kubectl apply -f example-ingress.yaml ``` -------------------------------- ### Verify Deployment Status with kubectl get deployment Source: https://github.com/neterialio/new-docs/blob/main/Guides/deploy-your-first-app.md Checks the status of the deployed `web-app` Kubernetes Deployment. It shows if the desired number of replicas are ready and available. This helps confirm that the application pods have started successfully. ```sh kubectl get deployment web-app ``` ```console NAME READY UP-TO-DATE AVAILABLE AGE web-app 1/1 1 1 27s ``` -------------------------------- ### Add and Update Helm Repository Source: https://github.com/neterialio/new-docs/blob/main/Guides/ingress-nginx.md Adds the ingress-nginx Helm chart repository to your local Helm configuration and updates the repository cache to fetch the latest chart information. ```bash helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update ``` -------------------------------- ### Install CertManager CRDs Source: https://github.com/neterialio/new-docs/blob/main/Guides/cert-manager.md Applies the CertManager CustomResourceDefinitions (CRDs) using kubectl. This step is essential before installing the main CertManager components. The output confirms the creation of various CRDs required for CertManager operations. ```sh kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.2/cert-manager.crds.yaml ``` -------------------------------- ### Verify Ingress-nginx Service Source: https://github.com/neterialio/new-docs/blob/main/Guides/ingress-nginx.md Retrieves the status of the ingress-nginx service, which typically includes an external IP address if a cloud-based load balancer is provisioned. ```bash kubectl get svc --namespace ingress-nginx ``` -------------------------------- ### Get Application URL with kubectl go-template Source: https://github.com/neterialio/new-docs/blob/main/Guides/deploy-your-first-app.md Retrieves the external URL or IP address for the `web-app` service using a Go template. This is useful for accessing the application from outside the Kubernetes cluster, typically via a LoadBalancer. The output is an HTTP link. ```sh kubectl get service web-app -o go-template --template='{{range .status.loadBalancer.ingress}}' '{{range $key, $val := . }}' '{{if eq $key "ip" "hostname"}}http://{{$val}}{"\n"}{{end}}' '{{end}}' '{{end}}' ``` -------------------------------- ### Verify Service Status with kubectl get service Source: https://github.com/neterialio/new-docs/blob/main/Guides/deploy-your-first-app.md Retrieves details about the `web-app` Kubernetes Service. This command shows information like the service type, cluster IP, and external IP or hostname if applicable. It confirms the service is correctly configured to expose the application. ```sh kubectl get service web-app ``` -------------------------------- ### Kubernetes Issuer Resource Details Source: https://github.com/neterialio/new-docs/blob/main/Guides/cert-manager.md This output displays the detailed status and configuration of a cert-manager Issuer resource after it has been applied to the Kubernetes cluster. It includes metadata, specification details (like ACME server, email, solver configuration), and the current status conditions, such as ACME account registration. ```APIDOC Kubernetes Issuer Resource Details: kubectl describe issuers.cert-manager.io Name: [name] Namespace: default Labels: Annotations: API Version: cert-manager.io/v1 Kind: Issuer Metadata: Creation Timestamp: 2024-02-14T23:32:58Z Generation: 1 Resource Version: 1479945 UID: c023b6a1-789f-44c8-8a30-d7ecace38acc Spec: Acme: Email: ak@neterial.io Private Key Secret Ref: Name: [name] Server: https://acme-v02.api.letsencrypt.org/directory Solvers: http01: Ingress: Ingress Class Name: nginx Status: Acme: Last Private Key Hash: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= Last Registered Email: [email] Uri: https://acme-v02.api.letsencrypt.org/acme/acct/1570600057 Conditions: Last Transition Time: 2024-02-14T23:32:58Z Message: The ACME account was registered with the ACME server Observed Generation: 1 Reason: ACMEAccountRegistered Status: True Type: Ready Events: ``` -------------------------------- ### Check Cluster Readiness with kubectl get nodes Source: https://github.com/neterialio/new-docs/blob/main/Guides/deploy-your-first-app.md Verifies that your Kubernetes cluster nodes are ready and operational. This command lists all nodes, their status, roles, age, and Kubernetes version. It's a crucial first step to ensure the cluster is healthy before deploying applications. ```sh kubectl get nodes ``` ```console NAME STATUS ROLES AGE VERSION nks-default-ctl-1d39beb8 Ready control-plane 9m39s v1.32.3 nks-default-wrk-5a451893 Ready 8m35s v1.32.3 ``` -------------------------------- ### Get Kubernetes Cluster Access (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Configures kubectl to use the context for the newly created Neterial Kubernetes cluster and lists the nodes. This verifies cluster readiness. ```sh kubectl config use-context default-neterial-admin@default-neterial kubectl get nodes ``` -------------------------------- ### Create Kubernetes Cluster with Custom Location (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Creates a Kubernetes cluster in a specific geographical location. Examples show how to set the location for AWS and Hetzner Cloud. ```sh neterial kube create cluster --cloud [CLOUD] --location [LOCATION] ``` ```sh neterial kube create cluster --cloud aws --location us-east-1 ``` ```sh neterial kube create cluster --cloud hcloud --location ash ``` -------------------------------- ### Define cert-manager Issuer Configuration Source: https://github.com/neterialio/new-docs/blob/main/Guides/cert-manager.md This YAML defines a cert-manager Issuer resource, typically used for obtaining TLS certificates from ACME-compliant servers like Let's Encrypt. It specifies the ACME server URL, an email address for notifications, a reference to a Kubernetes Secret for storing the ACME account private key, and configures the HTTP-01 challenge solver. ```yaml apiVersion: cert-manager.io/v1 kind: Issuer metadata: name: [issuer name] spec: acme: # The ACME server URL server: https://acme-v02.api.letsencrypt.org/directory # Email address used for ACME registration email: [email] # Name of a secret used to store the ACME account private key privateKeySecretRef: name: [privateKeySecretRef] # Enable the HTTP-01 challenge provider solvers: - http01: ingress: ingressClassName: nginx ``` -------------------------------- ### Hetzner Cloud API Token Management Source: https://github.com/neterialio/new-docs/blob/main/Cloud-providers/connect-hetzner-cloud-small.md Details the process of generating API tokens within the Hetzner Cloud Console. It outlines the steps, permission levels (Read for GET, Read & Write for GET, DELETE, PUT, POST), and the mandatory inclusion of the secret API token in the Authorization header for all API requests. It also warns that tokens cannot be viewed again after closing the generation window. ```APIDOC API Token Generation Process: 1. Navigate to Security -> API tokens in the Cloud Console. 2. Select 'Generate API token'. 3. Enter a description and choose permissions: - Read: Allows GET requests. - Read & Write: Allows GET, DELETE, PUT, POST requests. 4. Copy the generated token. It cannot be viewed again. API Request Authorization: - Your secret API token must be included in every request. - Use the 'Authorization: Bearer $API_TOKEN' header. ``` ```bash curl \ -H "Authorization: Bearer $API_TOKEN" \ ... ``` -------------------------------- ### Authenticate Hetzner Cloud API with curl Source: https://github.com/neterialio/new-docs/blob/main/Cloud-providers/connect-hetzner-cloud.md This example shows how to include your Hetzner Cloud API token in the Authorization header when making requests with curl. The token is required for all authenticated API interactions. ```bash curl \ -H "Authorization: Bearer $API_TOKEN" \ ... ``` -------------------------------- ### Deploy Application using kubectl apply Source: https://github.com/neterialio/new-docs/blob/main/Guides/deploy-your-first-app.md Applies a Kubernetes manifest file to create or update resources in the cluster. This command deploys the Nginx web application defined in the `web-app.yaml` file. It creates a Deployment and a Service for the application. ```sh kubectl apply -f web-app.yaml ``` ```console deployment.apps/web-app created service/web-app created ``` -------------------------------- ### Kubernetes Web Application Deployment Manifest Source: https://github.com/neterialio/new-docs/blob/main/Guides/deploy-your-first-app.md This YAML file defines a simple Nginx web application deployment and a corresponding service. The Deployment ensures that one replica of the Nginx pod is running, and the Service exposes it via a ClusterIP, making it accessible within the cluster. ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: web-app spec: replicas: 1 selector: matchLabels: app: web-app template: metadata: labels: app: web-app spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 --- apiVersion: v1 kind: Service metadata: name: web-app spec: selector: app: web-app ports: - protocol: TCP port: 80 targetPort: 80 type: ClusterIP ``` -------------------------------- ### Connect Hetzner Cloud Provider (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Initializes the connection for Hetzner Cloud by prompting for an API token. Ensure you have generated an API token from your Hetzner Cloud account. ```sh neterial provider init hcloud ``` -------------------------------- ### JavaScript Configuration for Docsify and Analytics Source: https://github.com/neterialio/new-docs/blob/main/index.html Initializes the docsify documentation generator with site name, logo, and loading options. Also configures Google Analytics tracking. ```javascript window.$docsify = { name: 'Documentation', logo: 'Neterial-Logo-Black.svg', loadSidebar: '\_sidebar.md', loadNavbar: '\_navbar.md', loadFooter: '\_footer.md', repo: 'https://github.com/neterialio/docs/tree/main', auto2top: true, relativePath: true }; window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-7LTTQN7WT3'); ``` -------------------------------- ### Connect AWS Cloud Provider (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Initializes the connection for AWS by prompting for AWS credentials. Follow the provided documentation to ensure your AWS credentials are set up correctly. ```sh neterial provider init aws ``` -------------------------------- ### Create Kubernetes Cluster (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Creates a Kubernetes cluster with default settings. This command assumes default naming and cloud provider configurations. ```sh neterial kube create cluster ``` -------------------------------- ### CSS Styling for Neterial Documentation Source: https://github.com/neterialio/new-docs/blob/main/index.html Defines CSS variables for typography, colors, spacing, and layout, along with specific styles for navigation, markdown sections, and responsive behavior. ```css :root { --base-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --base-font-size: 16px; /* Zmeev add */ --base-letter-spacing: -1%; --heading-h1-font-weight: 700; --heading-h2-font-weight: 600; /* End of Zmeev add */ --theme-color: rgb(84, 107, 228); --link-color: rgb(84, 107, 228); --link-color--hover: #EE2B47; --sidebar-name-margin: 0; --sidebar-name-padding: 0; --sidebar-padding: 0 25px; --code-font-size: .9em; } .sidebar > h1 { margin-bottom: -.75em; margin-top: .75em; } .sidebar > h1 img { height: 1.4em; } .markdown-section a code { color: var(--link-color)!important; } .markdown-section code:not([class*="lang-"]):not([class*="language-"]) { white-space: unset } /*Zmeev add */ .app-nav:not(:empty)~main .markdown-section { padding-top: 8em; } .markdown-section h1 a[data-id], .markdown-section h2 a[data-id], .markdown-section h3 a[data-id], .markdown-section h4 a[data-id], .markdown-section h5 a[data-id], .markdown-section h6 a[data-id] { letter-spacing: -0.025em; } /* End of Zmeev add */ .github-corner { display: none } nav.app-nav { margin-left: var(--sidebar-width); padding: 1.18em 0 1.18em 0; } /*Zmeev: Hide header on mobile */ @media screen and (max-width: 600px) { nav.app-nav { display: none; } } /*Zmeev: End of Hide header on mobile */ .app-nav { position: sticky; /* Zmeev: Changed to from absolute to sticke */ z-index: 30; top: 0; /*Zmeev add */ left: 0px; right: 0px; background: var(--sidebar-background); box-shadow: 1px 1px 1px 1px rgb(0 0 0 / 5%); text-align: center; font-family: Inter, Inconsolata, Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-weight: 500; /* End of Zmeev add */ } ``` -------------------------------- ### Clean Up Resources with kubectl delete Source: https://github.com/neterialio/new-docs/blob/main/Guides/deploy-your-first-app.md Removes the deployed Kubernetes resources (Deployment and Service) associated with the `web-app.yaml` file. This command is used to revert the changes made during the deployment process and clean up the cluster. ```sh kubectl delete -f web-app.yaml ``` ```console deployment.apps "web-app" deleted service "web-app" deleted ``` -------------------------------- ### List Connected Cloud Providers (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Displays a list of cloud providers that are currently connected to your Neterial account. This command helps in verifying your cloud integrations. ```sh neterial provider list ``` -------------------------------- ### Create Kubernetes Cluster with Custom Name and Cloud (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Creates a Kubernetes cluster with a specified name and cloud provider. The `--cloud` parameter accepts 'hcloud' or 'aws'. ```sh neterial kube create cluster --name [CLUSTER_NAME] --cloud [CLOUD] ``` -------------------------------- ### Create Kubernetes Cluster with Custom Worker Configuration (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Creates a Kubernetes cluster and allows specifying the worker node's VM type and the total number of worker nodes. ```sh neterial kube create cluster --worker-vm-type [VM_TYPE] --worker-count [COUNT] ``` -------------------------------- ### List Nodes in a Cluster (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Lists all the nodes associated with a specific Kubernetes cluster. This is useful for monitoring and managing cluster resources. ```sh neterial kube get nodes --cluster [CLUSTER_NAME] ``` -------------------------------- ### Delete Neterial Account (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Deletes your Neterial account. This action is permanent and will remove your account and associated management capabilities, though existing clusters may remain accessible. ```sh neterial account delete ``` -------------------------------- ### Add Node to Existing Cluster (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Adds a new worker node to an existing Kubernetes cluster without specifying a VM type, using default configurations. ```sh neterial kube create node --cluster [CLUSTER_NAME] ``` -------------------------------- ### Add Worker Node to Cluster (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Adds a new worker node to an existing Kubernetes cluster. You can specify the VM type for the new node. ```sh neterial kube create node --cluster [CLUSTER_NAME] --vm-type [VM_TYPE] ``` -------------------------------- ### Remove Node from Cluster (sh) Source: https://github.com/neterialio/new-docs/blob/main/CLI.md Removes a specific worker node from an existing Kubernetes cluster. You must provide the cluster name and the node name to be removed. ```sh neterial kube delete node --cluster [CLUSTER_NAME] --node [NODE_NAME] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.