Skip to content

Instantly share code, notes, and snippets.

@warroyo
warroyo / bf.yml
Created August 23, 2019 18:15
bf sample workload
apiVersion: v1
kind: Pod
metadata:
name: bf-demo2
namespace: default
spec:
containers:
- name: bf-demo
image: shawnmkelly/bitfusion:tensorflow
resources:
@warroyo
warroyo / wintest.yml
Last active September 18, 2019 01:01
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: win-webserver
name: win-webserver
spec:
replicas: 2
template:
metadata:
@warroyo
warroyo / wintest2.yml
Last active September 18, 2019 00:51
apiVersion: apps/v1
kind: Deployment
metadata:
name: blog-2019
labels:
app: blog-2019
spec:
replicas: 1
template:
metadata:
@warroyo
warroyo / rbac.yml
Created October 2, 2019 18:42
helm rbac
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: tiller
@warroyo
warroyo / cic-k8s-ingress-controller.yaml
Last active February 12, 2020 01:27
citrix ingress yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: cic-k8s-role
rules:
- apiGroups: [""]
resources: ["endpoints", "ingresses", "pods", "secrets", "nodes", "routes", "namespaces"]
verbs: ["get", "list", "watch"]
# services/status is needed to update the loadbalancer IP in service status for integrating
# service of type LoadBalancer with external-dns
@warroyo
warroyo / encypted-tkg.yml
Created May 14, 2020 20:29
tkg plan with etcd encrypted
---
apiVersion: cluster.x-k8s.io/v1alpha3
kind: Cluster
metadata:
name: '${ CLUSTER_NAME }'
namespace: '${ NAMESPACE }'
spec:
clusterNetwork:
pods:
cidrBlocks:
@warroyo
warroyo / find.sh
Created July 20, 2020 21:51
match TKGI k8s nodes to vsphere vms
#!/bin/bash
set -e
BOSH_IDS=$(kubectl get nodes -o=jsonpath='{.items[*].metadata.labels.bosh\.id}')
for i in ${BOSH_IDS} ; do
VM=$(govc find -json / -type m -customValue "*:$i")
echo "Node: $i"
echo "VM: $VM"
@warroyo
warroyo / inject-cert.sh
Created August 5, 2020 15:38
add lab ca to tkg
#!/usr/bin/env bash
set -euxo pipefail
tdnf update -y
tdnf install -y ca-certificates
tdnf install -y openssl-c_rehash
TRUSTED_CERT="-----BEGIN CERTIFICATE-----
MIIE8zCCA1ugAwIBAgIQXmh5aHQ2iQdNCA2F0SvKuzANBgkqhkiG9w0BAQsFADCB
kTEeMBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMTMwMQYDVQQLDCp3aWxs
aWFtYXJyb3lvQFdpbGxpYW1zLU1hY0Jvb2stUHJvLTIubG9jYWwxOjA4BgNVBAMM
MW1rY2VydCB3aWxsaWFtYXJyb3lvQFdpbGxpYW1zLU1hY0Jvb2stUHJvLTIubG9j
@warroyo
warroyo / istio-prom.yml
Created October 15, 2020 18:59
wavefront-istio
{
"name": "Istio-prom-metrics",
"url": "Istio-prom-metrics",
"description": "This dashboard displays real-time visibility into the Istio service mesh.",
"eventFilterType": "BYCHART",
"eventQuery": "",
"defaultTimeWindow": "2h",
"displayDescription": false,
"displaySectionTableOfContents": true,
"displayQueryParameters": true,
@warroyo
warroyo / override-rbac.yml
Created January 5, 2021 17:11
override rbac
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: wcp:administrators:override
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- apiGroup: rbac.authorization.k8s.io