- Get pods
kubectl get pods
- Enter into pod
kubectl exec -it [pod-name] /bin/bash
#!/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 |
kubectl get pods
kubectl exec -it [pod-name] /bin/bash
vault:
container_name: vault
image: dtestops/vault
volumes:
- ./vault.hcl:/etc/vault.hcl
links:
- "mysql:mysql"
ports:
- "8200:8200"
#!/bin/bash
if [ ! -z "$DEBUG" ]; then
set -x
DEBUG=
fi
DOMLIST="example.com"
for D in $DOMLIST
npm install -g yo generator-hubot
mkdir myhubot
cd myhubot
yo hubot
bin/hubot
Hubot>
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
helm init --service-account tiller --upgrade
helm init
# Remote write configuration (for Graphite, OpenTSDB, or InfluxDB).
remote_write:
- url: "http://localhost:8086/api/v1/prom/write?u=paul&p=foo&db=prometheus"
# Remote read configuration (for InfluxDB only at the moment).
remote_read:
- url: "http://localhost:8086/api/v1/prom/read?u=paul&p=foo&db=prometheus"
gcloud beta compute sole-tenancy node-templates create test-tenant-node --region us-central1 --node-requirements vCPU=any,memory=any,localSSD=0
gcloud beta compute sole-tenancy node-groups create sole-tenancy-group --zone us-central1-b --node-template test-tenant-node --target-size 2
gcloud beta compute instances create my-sole-instance --zone us-central1-b --image-family ubuntu-1604-lts --image-project ubuntu-os-cloud --node-group sole-tenancy-group --custom-cpu 4 --custom-memory 5
gcloud beta compute sole-tenancy node-templates list