Skip to content

Instantly share code, notes, and snippets.

/*
Copyright 2017 Bryan Keller (https://github.com/widget-)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
#!/bin/bash
# IBM Cloud Kubernetes Service cluster config dir
clustersdir=~/.bluemix/plugins/container-service/clusters
#Produce a Kubernetes merged config string to be used with the KUBECONF environment variable.
# CHANGE VALUE
# Note the value is the IBM ID used to log into ibmcloud. This is the same
# value that appears in the downloaded IKS cluster config files for the
#!/bin/bash
# Download all IBM Cloud Kubernetes Service (IKS) cluster configurations for each cluster
# that the currently logged in user has access. Ensure that you have not restricted
# visibility to a single region using the `ibmcloud ks init` command.
# IBM Cloud Kubernetes Service cluster config dir
clustersdir=~/.bluemix/plugins/container-service/clusters
for arg in "$@"
@dcberg
dcberg / istio-chain-ingress-bluemix-helm-tls.yaml
Created June 2, 2017 14:05
Kubernetes ingress file to be used with IBM Bluemix container service and the istio bookinfo sample installed using the istio helm chart
#############################################################################
# This kubernetes ingress resource is designed to be used in conjunction
# with a kubernetes cluster from the IBM Bluemix Container Service (https://bluemix.net)
# and the istio helm chart (https://github.com/kubernetes/charts/tree/master/incubator/istio).
#
# This ingress is to be used with the istio bookinfo example (https://istio.io/docs/samples/bookinfo.html).
#
# This file will create an ingress in the kubernetes cluster where the default
# ingress controller will perform tls termination and route the request to the istio
# gateway. The ingress includes wildcard entries for the istio add-ons for prometheus,
@dcberg
dcberg / weave-scope-rbac-alpha-read-only.yaml
Last active September 27, 2018 08:15
Kubernetes rbac file providing read-only access for weave-works scope using the v1alpha1 format for rbac.
# Read-only permissions and roles for weave-scope
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: weave-scope-mgr
rules:
- apiGroups: ["*"]
resources: ["services", "deployments", "replicasets", "pods", "replicationcontrollers", "namesapces", "nodes", "daemonsets"]
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["*"]
@dcberg
dcberg / weave-scope-rbac-alpha.yaml
Last active June 1, 2017 04:01
Kubernetes rbac file with read/write access for weave-works scope using the v1alpha1 format for rbac.
# Read/write permissions and roles for weave-scope
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: weave-scope-mgr
rules:
- apiGroups: [""]
resources: ["services", "replicationcontrollers", "namesapces", "nodes", "daemonsets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]