Skip to content

Instantly share code, notes, and snippets.

View angelbarrera92's full-sized avatar
☀️
Getafe, +17°

Ángel angelbarrera92

☀️
Getafe, +17°
View GitHub Profile
@angelbarrera92
angelbarrera92 / k8spin-madScalability.md
Created November 11, 2019 13:01
K8Spin @ madScalability

Resumen

K8Spin offers in SaaS format Kubernetes Namespaces. What does this mean? We open to everyone the possibility of having a space within a common Kubernetes cluster. Is kubernetes ready for this? Are the typical tools of the Kubernetes ecosystem prepared?

We will see the current possibilities and the POCs that we are carrying out in K8Spin.

Speakers

Ángel Barrera - Kubernetes Engineer at SIGHUP

@angelbarrera92
angelbarrera92 / README.md
Last active December 13, 2019 09:50
Tech events - CFP - Sites

Tech events - CFP - Sites

I was looking for a site with a list of tech conferences to make it simple to submit CFP. I found some sites, luckily the twitter tech community help us with more sites:

@angelbarrera92
angelbarrera92 / Getting-started-with-Istio-by-SIGHUP.md
Created January 23, 2020 19:28
Getting started with Istio by SIGHUP

Getting started with Istio by SIGHUP

Español

Description

En este workshop vamos a instalar juntos Istio 1.4.2 en un cluster de Kubernetes 1.15 explicando los conceptos basicos de cualquier Service Mesh a la vez que se explican objetos de Istio sobre Kubernetes.

Se cubriran los siguientes temas:

@angelbarrera92
angelbarrera92 / main.py
Last active April 25, 2020 17:43
Generate Kubernetes client certificates using own CA
import random
from OpenSSL import crypto
import base64
###########
# CA Cert #
###########
with open("ca.key", "r") as my_cert_file:
my_cert_text = my_cert_file.read()
@angelbarrera92
angelbarrera92 / README.md
Last active May 23, 2020 06:06
Kubernetes: Create users in groups

Usage

chmod +x create-user.sh
# ./create-user.sh <username> <group>
./create-user.sh angel k8spin
./create-user.sh pau k8spin
./create-user.sh bill microsoft
#!/bin/bash
# Create the cluster
kind create cluster --name lb
# Get the configuration
kind get kubeconfig --name lb > /tmp/lb-kubeconfig
# Deploy metallb
KUBECONFIG=/tmp/lb-kubeconfig kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.5/manifests/namespace.yaml
KUBECONFIG=/tmp/lb-kubeconfig kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.5/manifests/metallb.yaml
KUBECONFIG=/tmp/lb-kubeconfig kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"
@angelbarrera92
angelbarrera92 / main.go
Last active December 11, 2020 18:22
capture control-c with confirmation
package main
import (
"bufio"
"fmt"
"os"
"os/signal"
"strings"
"syscall"
"time" // or "runtime"
@angelbarrera92
angelbarrera92 / auth-dockerhub-kind.yaml
Created January 4, 2021 12:24
Avoid DockerHub rate limit on kind configuration
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
- role: worker
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry]
@angelbarrera92
angelbarrera92 / download_organization_repositories.sh
Last active February 1, 2021 12:40
Download repositories from the GitHub api of an entire organization
#!/bin/bash
# Download repositories from the GitHub api of an entire organization
# It downloads the default branch of each repository
# Creating .tar file
# Usage: ./download_organization_repositories.sh k8spin k8spin_repositories ${GITHUB_PERSONAL_ACCESS_TOKEN}
# Requires curl, jq and bash
org_name="$1"
@angelbarrera92
angelbarrera92 / prometheus-operator-namespace-issue.yaml
Created February 18, 2021 15:33
Simple example to reproduce the issue while changing namespace labels configured in a Prometheus CRD as namespaceSelector
---
apiVersion: v1
kind: Namespace
metadata:
labels:
example.com.app: app-1
monitoring: "true"
name: monitoring-app-1
---
apiVersion: v1