Skip to content

Instantly share code, notes, and snippets.

View jordiclariana's full-sized avatar

Jordi Clariana jordiclariana

View GitHub Profile
@jordiclariana
jordiclariana / 01-multus-k3s.md
Created October 29, 2023 13:52 — forked from janeczku/01-multus-k3s.md
Multus CNI with k3s and RKE

Using Multus CNI in K3S

By default, K3S will run with flannel as the CNI and use custom directories to store CNI plugin binaries and config files(You can inspect the kubelet args K3S uses via journalctl -u k3s|grep cni-conf-dir). So you need to configure that properly When deploying Multus CNI.

For example given the official Multus manifests in https://github.com/intel/multus-cni/blob/36f2fd64e0965e639a0f1d17ab754f0130951aba/images/multus-daemonset.yml, the following changes are needed:

volumes:
 - name: cni
@jordiclariana
jordiclariana / add_to_bashrc.sh
Created April 7, 2022 08:34 — forked from vyaslav/add_to_bashrc.sh
aliases for kubectl with autocomplete
source <(kubectl completion bash)
__start_kubectl_cust()
{
local cur prev words cword
declare -A flaghash 2>/dev/null || :
if declare -F _init_completion >/dev/null 2>&1; then
_init_completion -s || return
else
__kubectl_init_completion -n "=" || return
fi
@jordiclariana
jordiclariana / secure-gcp-checklist.md
Created February 22, 2022 08:48 — forked from mikesparr/secure-gcp-checklist.md
Secure Google Cloud Platform Checklist

Secure GCP infrastructure checklists

Initial setup

  • Configure org policies
    • Restrict allowed IAM domains
    • Disable key download
    • Disable default network
    • Disable external IP
    • Require shielded VM
  • Prepare for VPC service controls (data protection)
@jordiclariana
jordiclariana / migrate-redis.py
Created January 26, 2019 09:54 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.