Skip to content

Instantly share code, notes, and snippets.

View youcefguichi's full-sized avatar
🏠
Working from home

Youcef Guichi youcefguichi

🏠
Working from home
View GitHub Profile

Construct te required secrets from the certs i provided

kubectl create secret generic truststore \
  --from-file=ca.p12=<path-to-your-ca.p12> \
  --from-literal=ca.password=<your-ca.password> \
  --namespace=test

From Layer 4 to Layer 7: Decoding Load Balancers and Proxy Modes—Is It Possible to Track a Hacker?

Load balancers are like the silent gatekeepers of our networks. They make sure that traffic is distributed evenly across our servers, reducing overload, keeping response times low, and minimizing downtime.

In this blog post, we are going to dig into what load balancers do at each layer, the differences between L4 and L7, proxy modes and how to work around challenges like preserving client IP addresses.

Table of Contents

  1. Introduction
  2. Layer 4 Load Balancer
// Example of handling Oauth Callback using Golang.
// this function is serving at this endpoint
// http://localhost:3005/oauth2/callback
func OAuthCallback(w http.ResponseWriter, r *http.Request) {
// this is getting the code value
// from our callback url http://localhost:3005/oauth2/callback?code=<some-code-here>
code := r.URL.Query().Get("code")

1.6 Million Kubernetes Clusters Open to the World! How Tailscale Can Help You Secure Yours?

Today we’ll show you:

  • How to Lock down your Kubernetes API server so it's not waving at strangers on the internet.
  • How to keep your internal services truly internal and secure .
  • How can Tailscale act as an identity provider.
  • How to Limit users' access with Tailscale.

Ready to make your Kubernetes experience smoother and more secure?

# sh vcluster.sh bublebee-vcluster youcef 600Mi 2000m 300Mi 1000m
VCLUSTER=$1
NAMESPACE=$2
MEMORY_LIMIT=$3
CPU_LIMIT=$4
MEMORY_REQUEST=$5
CPU_REQUEST=$6
{{- $websiteDirectory := regexFind "([^\\/]+$)" .Values.staticSite.gitCloneUrl | replace ".git" "" }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "static-site.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: initcon
name: initcon
spec:
volumes:
- name: static-files
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: initcon
name: initcon
spec:
volumes:
- name: static-files