Skip to content

Instantly share code, notes, and snippets.

Doug Smith dougbtv

Block or report user

Report or block dougbtv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dougbtv
dougbtv / README.md
Created Oct 16, 2019
Bridge CNI + Static IPAM in OpenShift 4.2 demo
View README.md

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 Oct 15, 2019
Running the cluster network operator against a running openshift cluster
View README.md

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 Aug 2, 2019
Installing cni-route-override and adding an additional route
View README.md

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 Aug 1, 2019
Whereabouts with additional specified routes
View README.md

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
KubeVirt SR-IOV setup helper script
View sriov-helper.sh
#!/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 Apr 26, 2019
Whereabouts Demo
View README.md
@dougbtv
dougbtv / README.md
Last active Mar 20, 2019
Running custom cluster-network-operator in OpenShift
View README.md

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 Feb 5, 2019
Multus + Weave sketch
View README.md

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
@dougbtv
dougbtv / README.md
Last active Aug 1, 2019
Daemonset for CNI DHCP process
View README.md

Multus + DHCP IPAM example

Prerequisites: Multus + NetworkAttachmentDefinition CRD installed.

In order to have DHCP working as an IPAM plugin -- you'll need to have the DHCP CNI binary running.

In this example, we'll run this (as a daemonset) from the dougbtv/dhcp image, which is based on Tomo's dockerfile.

About my setup: In this setup, I use a macvlan plugin as the secondary interface for Multus. In my setup, I used an upstream Kubernetes running on KVM guests. The master device for macvlan is eth0 and that device is connected to a bridge in the 192.168.122.0/24 network space, and has an already running DHCP server available.

@dougbtv
dougbtv / virtdp-daemonset.yaml
Last active Oct 20, 2018
Modified virtual device plugin daemonset
View virtdp-daemonset.yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: virt-device-plugin
namespace: kube-system
---
apiVersion: extensions/v1beta1
kind: DaemonSet
You can’t perform that action at this time.