Skip to content

Instantly share code, notes, and snippets.

View ams0's full-sized avatar
🏠
Working from home

Alessandro Vozza ams0

🏠
Working from home
View GitHub Profile
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: docker-root
spec:
selector:
matchLabels:
name: docker-root
template:
metadata:
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dashboard-viewonly
rules:
- apiGroups:
- ""
resources:
- configmaps
kubectl create serviceaccount -n kube-system tiller; kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller; helm init --service-account tiller
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
wget -qO- https://github.com/heketi/heketi/releases/download/v8.0.0/heketi-client-v8.0.0.linux.amd64.tar.gz| tar xvz ; chmod +x heketi-client/bin/heketi-cli ; sudo mv heketi-client/bin/heketi-cli /usr/local/bin
export HEKETI_CLI_SERVER="http://`oc get route -n glusterfs -o=jsonpath="{.items[*].status.ingress[*].host}"`"
export HEKETI_CLI_KEY=`oc get secret -n glusterfs heketi-storage-admin-secret -o template --template={{.data.key}}|base64 -d`
export HEKETI_CLI_USER=admin
heketi-cli cluster info

A collapsible section with markdown

Azure Kubernetes Service

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
#!/bin/bash
#install Gitlab CE
yum -y update
yum install -y curl policycoreutils-python epel-release
yum -y install nginx
yum install -y postfix
systemctl enable postfix
systemctl start postfix
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: win-webserver
name: win-webserver
spec:
replicas: 1
selector:
matchLabels:
[root@g1 rhel]# targetcli ls /iscsi
o- iscsi ....................................................................... [Targets: 4]
o- iqn.2016-12.org.gluster-block:149ee39c-3198-45aa-a710-099a71c72901 ........... [TPGs: 3]
| o- tpg1 ............................................................. [gen-acls, no-auth]
| | o- acls ..................................................................... [ACLs: 0]
| | o- luns ..................................................................... [LUNs: 1]
| | | o- lun0 .......................................................... [user/data (None)]
| | o- portals ............................................................... [Portals: 1]
| | o- 192.168.1.10:3260 ........................................................... [OK]
| o- tpg2 ...................................................................... [disabled]
#!/bin/bash
#usage: db2_setup.sh <db2_username> <db2_password> <db2_dbname>
#setup DB2 on RHEL7.4
USER=$1
PASSWD=$2
DB=$3
#pre-reqs