Skip to main content

OnPremises Provider

The OnPremises provider will automate the creation of a kubeadm Kubernetes cluster using pre-existing infrastructure (bare-metal or VMs) and it will install SD modules on top of it.

This document provides a through guidance abount every aspect of the configuration file. You can find the reference schema for this provider here.

Prerequisites​

The VMs or bare-metal machines will need to:

  • Have a working Linux OS with systemd (supported OSes: RHEL and derivatives, Debian and derivatives)
  • Have an SSH server installed and enabled
  • Have a user with an SSH public key to allow passwordless authentication. This user must also be able to sudo without password.
  • Have a host name that resolves to the IP address of the machine, not to a loopback address such as 127.0.0.1 or 127.0.1.1. To check, run hostname -i on the machine. Some distributions, for example Debian and Ubuntu, add a line such as 127.0.1.1 <host name> to /etc/hosts: change this line to use the IP address of the machine. The etcd members find each other by host name (<name>.<dnsZone>), but they listen on the IP address that is set in the configuration file. If the host name resolves to a loopback address, the two addresses are different and etcd does not start.
note

The same user must be configured on all the VMs. This is needed by the Provisioner's Ansible automations. See the annex to have some guidance about creating such users.

The environment from which you run furyctl also needs to be allowed to reach your VMs via SSH.

tip

If you want to install SD on bare-metal nodes, the Install SD on Bare-Metal Nodes document contains more specific guidance. After setting your environment, come back here to complete the configuration.

Note on security​

The OnPremises provider will turn off swap on all the machines and put SELinux in permissive mode for RHEL and derivatives. See more about the kubeadm requirements here.

Sometimes, security software causes slow downs, timeouts, and performance issues. In that case, we need to disable the security software to see if the issue is related to it.

In general, it's recommended to use security software that is container aware and designed to run on top of Kubernetes, typically using DaemonSet deployments, such as Sysdig.

Legacy host level security software installations (SSH access, running as root-like users, and/or installed by the package manager), may not work well in Kubernetes environments.

PKI​

The cluster will need a Public Key Infrastructure (PKI) to create certificates for both the ETCD database and the Control Plane.

To create a PKI with self-signed certificates, run:

furyctl create pki

This will create a folder named pki in your current working directory. See also PKI and secrets.

Configuration file creation​

Create a configuration file with:

furyctl create config --kind OnPremises --version <sd-version> --name <cluster-name>

Replace <sd-version> with the SD version that you want to install, for example v1.36.0. To see the versions that your furyctl supports, run furyctl get supported-versions.

This will create a new furyctl.yaml file with some default values. Read more to learn how to customize this file.

Note that the metadata.name parameter is the name of your cluster and it is used by furyctl to maintain the current status locally. It's not used by Kubernetes.

spec.kubernetes section​

This section will drive the Kubernetes provisioning.

Inside the generated config file you will already find some guidance about the fields in the comments.

At least, you will need to edit the following parameters:

  • ssh: insert the username you chose before and the path of your private SSH key.
  • proxy: the addresses of your HTTP proxy, or delete it if you do not use one. See Use an HTTP proxy.
  • loadBalancers: this section will drive the creation of HAProxy loadbalancers, with an optional keepalived virtual IP on top of them. If you want this, edit the section to match the addresses of the VMs you want to become load balancers, otherwise set the enabled parameter to false.
  • masters: here you provide the names and addresses of the VMs that will act as the Control Plane of your Kubernetes cluster.
  • nodes: this section holds the names and addresses of all other nodes of the cluster. Here you can create subsets of nodes (node groups) to logically group them according to your needs. Typically, a SD cluster will have 3 "infra" nodes that will only host the SD modules using a dedicated taint, plus any number of "worker" nodes dedicated to the actual workload, but you can configure this section anyway you want. The name parameter will become a role label that you can use later to select those nodes. You can also optionally specify additional labels and annotations for each node group using the labels and annotations objects.
warning

Support for the ARM platform is still in beta status, the Load Balancers managed by furyctl are not currently supported for RHEL and RHEL derivatives running on ARM.

Please use a different OS for the Load Balancers VMs (or disable them and create your own load balancer) if you want to use an ARM-based host.

spec.distribution section​

This section is dedicated to the configuration of the SD core modules to be installed inside the cluster.

As usual, in the default configuration file you will find some comments to guide you editing this section.

common.networkPoliciesEnabled​

EXPERIMENTAL FEATURE. This field defines whether Network Policies are provided for core modules.

To see more details about the applied policies, head to the dedicated page in the distribution repository.

common.nodeSelector and common.tolerations​

These parameters will be applied to every module. If you have labeled and/or tainted some nodes to host specifically SD modules, you can put your values here to avoid placing SD modules on all nodes.

spec.distribution.modules section​

This section configures the SD core modules. The modules work in the same way in all the providers. See Configure the modules.

Use an HTTP proxy​

If the nodes reach the Internet through an HTTP proxy, set spec.kubernetes.proxy:

spec:
kubernetes:
proxy:
http: "http://proxy.example.dev:3128"
https: "http://proxy.example.dev:3128"
noProxy: "localhost,127.0.0.1,172.16.0.0/17,172.16.128.0/17,10.0.0.0/8,.example.dev"

All three fields are optional. SD uses them only for containerd: furyctl writes them as HTTP_PROXY, HTTPS_PROXY and NO_PROXY in a systemd drop-in file of containerd, so that the image pulls use the proxy. In noProxy, add the hosts that containerd must reach directly, for example a registry mirror in your network.

The other downloads on the nodes do not use this proxy, for example the operating system packages that the installation adds. Configure the proxy for them yourself before you run furyctl apply, for example in the configuration of the package manager.

If the proxy decrypts TLS, containerd must trust the CA of the proxy. Add the CA certificate to the trust store of the operating system on each node, then restart containerd.

The Immutable provider uses a different field and applies the proxy to the whole node: see Use an HTTP proxy on the Immutable page.

Annex: Create a passwordless Linux user​

When you create your VMs, be sure to create a user that is named exactly the same in all of them. This user must also be allowed to login using an SSH key and to use sudo without passwords.

We suggest to use some form of VM template, so that you can configure one VM and clone it to reach the number of Kubernetes nodes that you need.

info

The following commands are provided as a guideline, some may change depending on your Linux distribution. Check your distribution's documentation for the right way to do this.

To create such a user:

  1. Create a new SSH keypair in your local machine with:

    ssh-keygen -q -t ed25519 -C "your@email.address" -N '' -f ssh-key
  2. If you already have the same user inside each of your VMs, you can skip this step. To create a new user, run the following snippet in one of the VMs:

    useradd -m <username>
    passwd <username> # choose a password for the user
  3. To enable passwordless logins, run the following snippet from your machine:

    cat ssh-key.pub | ssh <username>@<vm-ip-or-name> 'tee -a ~/.ssh/authorized_keys'
  4. To enable passwordless sudo escalation, run the following snippet from your machine:

    ssh -t <username>@<vm-ip-or-name> 'sudo visudo'

    Paste the following line at the end of the file (be sure to substitute <username> with the actual username) and save it:

    <username> ALL=ALL NOPASSWD: ALL

Clone this VM if you can, or repeat steps 2-4 for each of them.

Now your VMs are ready!