Skip to content

Instantly share code, notes, and snippets.

View neoaggelos's full-sized avatar

Angelos Kolaitis neoaggelos

View GitHub Profile
@neoaggelos
neoaggelos / install.sh
Last active November 17, 2023 13:30
k8s cilium v0
# Configure cluster CIDR
IPv4_CLUSTER_CIDR="10.1.0.0/16"
IPv6_CLUSTER_CIDR=""
# Require cgroup2 to be mounted
cgroup_hostroot="$(mount -t cgroup2 | head -1 | cut -d' ' -f3)"
if [ -z "$cgroup_hostroot" ]; then
echo "cgroup2 mount not found, fail"
exit 1
fi
@neoaggelos
neoaggelos / README.md
Last active October 27, 2023 13:36
MicroK8s OpenStack cloud controller manager

Deploy OpenStack Cloud Controller Manager

Service configuration

a. Using Launch Configurations

Make sure to set --cloud-provider=external in Kubelet arguments. If not installed yet, use a launch configuration like this:

echo '
@neoaggelos
neoaggelos / readme.md
Created October 19, 2023 12:14
create ceph pools with custom device class

Custom device class

Configure custom device classes (e.g. nvme disks, high io disks, limiting hosts)

By default, ceph uses ssd and hdd disk classes

ceph osd df
ID  CLASS  WEIGHT   REWEIGHT  SIZE    RAW USE  DATA     OMAP    META     AVAIL    %USE   VAR   PGS  STATUS
 0    hdd  0.01459   1.00000  15 GiB  6.2 GiB  1.2 GiB   1 KiB  513 MiB  8.8 GiB  41.44  1.48   44      up
@neoaggelos
neoaggelos / README.md
Created August 28, 2023 14:28
MicroK8s Cinder CSI
  1. Create secret.yaml with openstack credentials, use template from this gist. Required actions:
    • Uncomment items needed if cloud uses a self-signed CA. Add CA in the ca.crt key.
    • If Cinder does not use the same AZs as Nova, uncomment the ignore-volume-az line.
  2. Create values.yaml using the template from this gist.
    • Uncomment items needed if cloud uses a self-signed CA.
    • If Cinder does not use the same AZs as Nova, uncomment the custom storage classes options and the availability to the name of the cinder AZ.
  3. Install Cinder CSI helm chart with:
microk8s helm repo add openstack https://kubernetes.github.io/cloud-provider-openstack
@neoaggelos
neoaggelos / kubevirt.yaml
Created July 25, 2023 18:24
MicroK8s kubevirt configuration
apiVersion: kubevirt.io/v1
kind: KubeVirt
metadata:
name: kubevirt
namespace: kubevirt
spec:
certificateRotateStrategy: {}
configuration:
developerConfiguration: {}
customizeComponents:
@neoaggelos
neoaggelos / cluster.yaml
Last active May 17, 2023 12:41
lxd provider cluster-api
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: test
namespace: default
spec:
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: MicroK8sControlPlane
name: test-control-plane
@neoaggelos
neoaggelos / microk8s-enable-gpu-1.21.sh
Last active May 29, 2023 14:41
Bash script to enable GPU support on MicroK8s 1.21
#!/bin/bash
# The script below documents the steps needed to install the NVIDIA GPU operator on MicroK8s 1.21 (for Ubuntu OS)
# 1. install microk8s and enable required addons
sudo snap install microk8s --classic --channel 1.21
microk8s enable dns
microk8s enable helm3
# 2. install nvidia drivers