Skip to content

Instantly share code, notes, and snippets.

View just1689's full-sized avatar
☁️
In the cloud

Justin Tamblyn just1689

☁️
In the cloud
  • South Africa
View GitHub Profile
@just1689
just1689 / misc
Created September 2, 2020 07:22
Fixing GlusterFS missing brick issue
# Check the volume to see if any nodes are down
sudo gluster volume status VOLUME_NAME_HERE detail
# Run as root
killall glusterfsd ; killall -9 glusterfsd ; killall glusterd ; glusterd
@just1689
just1689 / install-as-root.sh
Created August 31, 2020 07:50
install GlusterFS on Ubuntu 18.04
wget -O - https://download.gluster.org/pub/gluster/glusterfs/7/rsa.pub | sudo apt-key add -
sudo add-apt-repository ppa:gluster/glusterfs-7
sudo apt install glusterfs-server -y
sudo systemctl start glusterd
sudo systemctl status glusterd
@just1689
just1689 / loki.sh
Created August 3, 2020 13:30
Local install / generate from helm chart
# Install Loki
helm install loki/loki-stack -n loki-stack --set fluent-bit.enabled=true,promtail.enabled=true,loki.persistence.enabled=true,loki.persistence.size=1Gi --namespace=loki-stack
# Generate Loki yaml
helm template loki-test -n loki-stack --set fluent-bit.enabled=true,promtail.enabled=true,loki.persistence.enabled=true,loki.persistence.size=1Gi --namespace=loki-test loki-stack-0.38.3.tgz > loki.yaml
@just1689
just1689 / clusterrole.yaml
Last active January 27, 2022 11:03
Read only cluster role for Lens read only users
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: read-only-clusterrole
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
- list
@just1689
just1689 / setup.sh
Created July 1, 2020 12:37
Kubernetes nodes setup
# To run this, ...
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP
# Install the repo
helm repo add loki https://grafana.github.io/loki/charts
helm repo update
# Install Loki
helm install loki/loki-stack -n loki-stack --set fluent-bit.enabled=true,promtail.enabled=true,loki.persistence.enabled=true,loki.persistence.size=1Gi --namespace=loki-stack --generate-name
# Install the repo
helm repo add stable https://kubernetes-charts.storage.googleapis.com
helm repo update
server {
listen 80;
server_name demo.colaboratory.co.za;
sendfile on;
location / {
proxy_buffer_size 64k;
@just1689
just1689 / cronscale-crd.yaml
Last active February 5, 2020 08:39
CRD example
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: cronscales.captainjustin.space
spec:
# group name to use for REST API: /apis/<group>/<version>
group: stable.captainjustin.space
# list of versions supported by this CustomResourceDefinition
versions:
@just1689
just1689 / run.sh
Created December 9, 2019 15:45
Create local user
adduser --disabled-password --gecos "" local
cp -r ~/.kube /home/local
chown -R local:local /home/local/.kube