Skip to content

Instantly share code, notes, and snippets.

Avatar
🐼
...

Deepesh Pathak fristonio

🐼
...
View GitHub Profile
@fristonio
fristonio / Vagrantfile
Created Apr 12, 2022
Bash script for Vagrant dev environment setup
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">=2.0.0"
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.provision "shell", path: "dev-setup.sh"
@fristonio
fristonio / cluster-admin-kubecfg.tf
Created Dec 30, 2020
Terraform file to create a kuebconfig file for a provided cluster with cluster admin access.
View cluster-admin-kubecfg.tf
variable "endpoint" {
type = string
description = "Endpoint of the kubernetes cluster."
}
variable "client_certificate" {
type = string
description = "Certificate to use for the kubernetes client."
}
@fristonio
fristonio / setup-dual-stack-tmp.sh
Created Nov 22, 2020
Setup a temporary dev DualStack environment for Cilium.
View setup-dual-stack-tmp.sh
#!/bin/bash
set -euxo pipefail
function setup_cilium() {
cat <<EOF >> /etc/sysconfig/cilium
CILIUM_OPERATOR_OPTS=" --debug --k8s-kubeconfig-path /var/lib/cilium/cilium.kubeconfig --kvstore etcd --kvstore-opt etcd.config=/var/lib/cilium/etcd-config.yml --cluster-pool-ipv4-cidr=10.16.0.0/12 --cluster-pool-ipv6-cidr=fd77::/112 --cluster-pool-ipv6-mask-size 120 --cluster-pool-ipv4-mask-size 24"
EOF
}
@fristonio
fristonio / cilium-dev-env.sh
Last active Jun 3, 2022
Cilium dev env bootstrap
View cilium-dev-env.sh
#!/bin/bash
# For debian based distro.
# This will setup a complete development environment for Cilium.
# You can also use the cilium vagrant based environment after this setup.
# ./contrib/vagrant/start.sh
set -euxo pipefail
is_user_root () { [ ${EUID:-$(id -u)} -eq 0 ]; }
@fristonio
fristonio / cilium.md
Last active Nov 4, 2020
Enabling dual-stack for CIlium dev environment
View cilium.md

Dual Stack setup for development env

Dual Stack setup for Kubernetes does not work with RUNTIME=containerd or RUNTIME=crio. Make sure you are running with default Docker container runtime.

Cilium

Edit /etc/sysconfig/cilium and modify CILIUM_OPTS and CILIUM_OPERATOR_OPTS.

Cilium Agent Options

@fristonio
fristonio / kubeadm-dual-stack.md
Last active Feb 22, 2021
K8s Dual Stack Kubeadm configuration
View kubeadm-dual-stack.md

Valid configuration example:

apiVersion: kubeadm.k8s.io/v1beta2
featureGates:
  IPv6DualStack: true
kind: ClusterConfiguration
networking:
  podSubnet: 10.10.0.0/16,2001:db8::/98
 serviceSubnet: 10.96.0.0/12,2001:db8:9999::/112
View k8s-node-env.sh
#!/usr/bin/env bash
# Script to configure a Kubeadm cluster on Ubuntu machine
set -eu
version_regex='^[0-9]+\.[0-9]+\.[0-9]+$'
KERNEL_VERSION="5.8.1"
K8S_VERSION="1.19.0"
START_TIME=$(date +"%T")
View gist:7cff67c579dc8edbf076daa56b2287ca
[connection]
id=Wired connection 1
uuid=755094a0-4144-309a-b301-32f87c340074
type=ethernet
autoconnect-priority=-999
permissions=
timestamp=1527987074
[ethernet]
mac-address=<MAC ADDR>
View dx.py
#!/usr/bin/env python
'''
Obtain the APP_ID, APP_KEY from https://developer.oxforddictionaries.com
'''
import os
import requests
import sys
import logging
@fristonio
fristonio / gsoc.md
Created Aug 9, 2018
GSoC 2018 Final Submission Report
View gsoc.md

GSoC 2018

GSoC 2018 Final Submission Report

  • Student: Deepesh Pathak
  • Github: @fristonio
  • Organisation: CloudCV

Project