Skip to content

Instantly share code, notes, and snippets.

View dougbtv's full-sized avatar

Doug Smith dougbtv

View GitHub Profile
@dougbtv
dougbtv / README.md
Last active May 5, 2020 14:20
static.route.whereabouts.json
@dougbtv
dougbtv / README.md
Last active May 11, 2023 16:31
Istio + Multus CNI: Annotation clobbering, replication and fix

Istio + Multus CNI: Annotation clobbering, replication and fix

This details a reference deployment of Istio w/ Multus CNI to demonstrate a problem where annotations are being clobbered by the Istio webhook. It also provides a patch and workflow for a possible fix.

This article first demonstrates how to reproduce the article, then proposes a patch, and demonstrates a way to build and deploy Istio with the modified code.

NOTE: Ignore the 1.5.1 through the install, I replicate it with latest (Nov 2021), and provide further steps following the rest of the installation.

Suggested system

@dougbtv
dougbtv / README.md
Created October 16, 2019 17:56
Bridge CNI + Static IPAM in OpenShift 4.2 demo

This is a demonstration of the Bridge CNI plugin, plus the static IPAM CNI plugin.

Requirements

  • A recently installed OpenShift (4.2/4.3) installed cluster.

Demo!

Firstly, we'll label a node so that we have two pods going to the same node.

@dougbtv
dougbtv / README.md
Created October 15, 2019 17:46
Running the cluster network operator against a running openshift cluster

Interactively running the cluster-network-operator

This describes how to run the cluster-network-operator for development purposes, using the ./hack/run-locally.sh script.

You'll need:

  • A recent install of openshift, here's Doug's cheat sheet
  • A clone of the cluster-network-operator.

Once that's in place you'll need to know:

@dougbtv
dougbtv / README.md
Created August 2, 2019 15:25
Installing cni-route-override and adding an additional route

Installation and usage of cni-route-override

Covers installing & configuring an example cni-route-override instance.

This example simply adds a static route.

Install route-override binaries

Install using the provided daemonset, this will copy the route-override binary to the /opt/cni/bin on each machine in your Kubernetes cluster.

@dougbtv
dougbtv / README.md
Last active July 5, 2023 13:45
Whereabouts with additional specified routes

Using Whereabouts + Multus to add an additional route on an additional network interface...

Install an etcd for data storage for Whereabouts.

$ git clone https://github.com/coreos/etcd-operator.git
$ cd etcd-operator/
$ example/rbac/create_role.sh
$ kubectl create -f example/deployment.yaml
$ watch -n1 kubectl get pods -o wide --all-namespaces
@dougbtv
dougbtv / sriov-helper.sh
Created May 9, 2019 19:35
KubeVirt SR-IOV setup helper script
#!/bin/bash
get_sriov_pci_root_addresses() {
for dir in $(find /sys/devices/ -name sriov_totalvfs -exec dirname {} \;); do
if [ $(cat $dir/sriov_numvfs) -gt 0 ]; then
# use perl because sed doesn't support non-greedy matching
basename $dir | perl -pe 's|(.*?:)(.*)|\2|'
fi
done
}
@dougbtv
dougbtv / README.md
Last active April 26, 2019 19:42
Whereabouts Demo
@dougbtv
dougbtv / README.md
Last active March 20, 2019 15:50
Running custom cluster-network-operator in OpenShift

stop the cluster version operator

[core@ip-10-0-7-170 ~]$ oc get deployments --namespace=openshift-cluster-version
[core@ip-10-0-7-170 ~]$ oc scale deployment cluster-version-operator --replicas=0 --namespace=openshift-cluster-version

Edit our deployment

Check out the current deployment...

@dougbtv
dougbtv / README.md
Created February 5, 2019 20:51
Multus + Weave sketch

Multus with weave sketch.

Spin up Kubernetes without a network, then... install weave per the installation guide

In theory before CNI plugin install nodes should be not ready & the CNI net.d folder should be empty...

[centos@kube-nonetwork-master ~]$ kubectl get nodes
NAME                    STATUS     ROLES    AGE   VERSION
kube-nonetwork-master   NotReady   master   58s   v1.13.3