4 minute read
QuickStart
This is comprehensive instruction guide to start working with a simple cluster.
Warning
This is not an instruction guide which should be used on a productive environment.Requirements
You can choose between Red Hat Enterprise Linux 8
or OpenSUSE 15
. All of your machines need the same os.
A total of 7 machines are required:
- one admin
- three master
- three worker
1x Admin-Node
- 2 CPUs
- 2 GB RAM
- 50 GB Boot disk storage
3x Master-Node
- 4 CPUs
- 8 GB RAM
- 50 GB Boot disk storage
3x Worker-Node
- 8 CPUs
- 16 GB RAM
- 50 GB Boot disk storage
- 50 GB unformatted no partitioned disk storage for Ceph
For more information about the harddrives for rook-ceph, visit the rook-ceph prerequisites page
Requirements on Admin
The following requirements must be fulfilled on the admin machine:
-
All the users require sudo privileges. We recommend using the root user.
-
Admin machine must be synchronized with the current time.
-
You need an internet connection to use the default KubeOps registry
registry1.kubernative.net/lima
. -
Install kubeopsctl and podman
Create an account and log in on the KubeOps official website for downloading the RPM in the Download section. Copy the kubeopsctl RPM on your admin machine in the home directory.
You must run this follwing command to install kubeopsctl and podman:
dnf install -y kubeopsctl*.rpm
dnf install -y podman
zypper install -y kubeopsctl*.rpm
zypper install -y podman
- $KUBEOPSROOT and $LIMAROOT must be set.
echo "export KUBEOPSROOT=\"${HOME}/kubeops\"" >> $HOME/.bashrc
echo "export LIMAROOT=\"${HOME}/kubeops/lima\"" >> $HOME/.bashrc
source $HOME/.bashrc
Prerequisites on Master and Worker Nodes
The following requirements must be fulfilled on master and worker nodes:
-
All the users require sudo privileges. We recommend using the root user.
-
Every machine must be synchronized with the current time.
-
You have to assign lowercase unique hostnames for every master and worker machine you are using.
We recommended using self-explanatory hostnames.
To set the hostname on your machine use the following command:
hostnamectl set-hostname <name of node>
- Example
Use the commands below to set the hostname on the particular machine asmaster1
,master2
,master3
,node1
node2
ornode3
.hostnamectl set-hostname master1 hostnamectl set-hostname master2 hostnamectl set-hostname master3 hostnamectl set-hostname node1 hostnamectl set-hostname node2 hostnamectl set-hostname node3
- Example
It is recommended that a dns service is running, or if you don’t have a DNS service, you can change the /etc/hosts file. An example for a entry in the /etc/hosts file could be:
10.2.10.11 master1 10.2.10.12 master2 10.2.10.13 master3 10.2.10.14 node1 10.2.10.15 node2 10.2.10.16 node3
Prerequisites on Admin Node
-
To establish an SSH connection between your machines, you need to distribute the SSH key from your admin to each of your master and worker nodes.
-
Generate an SSH key on admin machine using following command
ssh-keygen
There will be two keys generated in ~/.ssh directory.
The first key is theid_rsa(private)
and the second key is theid_rsa.pub(public)
. -
Copy the ssh public key from your admin machine to all node machines with
ssh-copy-id
, e.g.:ssh-copy-id master1
-
Now try to establish a connection to the node machines from your admin machine, e.g.:
ssh master1
-
Platform Setup
In order to install your cluster you need the following steps:
- kubeopsctl.yaml creation
vi kubeopsctl.yaml
Example kubeopsctl.yaml
the names of the nodes should be the same as the hostnames of the machines.
apiVersion: kubeops/kubeopsctl/alpha/v3 # mandatory
imagePullRegistry: "registry1.kubernative.net/lima"
localRegistry: true
clusterName: "example"
kubernetesVersion: "1.28.2"
masterIP: 10.2.10.11
zones:
- name: zone1
nodes:
master:
- name: cluster1master1
ipAdress: 10.2.10.11
status: active
kubeversion: 1.28.2
- name: cluster1master2
ipAdress: 10.2.10.12
status: active
kubeversion: 1.28.2
worker:
- name: cluster1worker1
ipAdress: 10.2.10.14
status: active
kubeversion: 1.28.2
- name: cluster1worker2
ipAdress: 10.2.10.15
status: active
kubeversion: 1.28.2
- name: zone2
nodes:
master:
- name: cluster1master3
ipAdress: 10.2.10.13
status: active
kubeversion: 1.28.2
worker:
- name: cluster1worker3
ipAdress: 10.2.10.16
status: active
kubeversion: 1.28.2
# mandatory, set to true if you want to install it into your cluster
rook-ceph: true
harbor: true
opensearch: true
opensearch-dashboards: true
logstash: true
filebeat: true
prometheus: true
opa: true
headlamp: true
certman: true
ingress: true
keycloak: true
velero: true
harborValues:
harborpass: "password" # change to your desired password
databasePassword: "Postgres_Password" # change to your desired password
redisPassword: "Redis_Password"
externalURL: http://10.2.10.91:30002 # change to ip adress of master1
prometheusValues:
grafanaUsername: "user"
grafanaPassword: "password"
ingressValues:
externalIPs: []
keycloakValues:
keycloak:
auth:
adminUser: admin
adminPassword: admin
postgresql:
auth:
postgresPassword: ""
username: bn_keycloak
password: ""
database: bitnami_keycloak
existingSecret: ""
veleroValues:
accessKeyId: "your_s3_storage_username"
secretAccessKey: "your_s3_storage_password"
When you are using ingress option, there are few updates needed in the settings of services. [Click here]( “ingress config”) to know more about it.
- Platform installation
kubeopsctl apply -f kubeopsctl.yaml
The installation will take about 3 hours.