-
Change
apiVersion
from:- apiVersion: v1
(or
apiVersion: apps.openshift.io/v1
)to:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# >>>>>> A 3-node, _compact_ cluster: <<<<<<<<<<<< | |
## API-VIP and APPS-VIP will be taken care of via keepalived, | |
## and you just need to provide API IPs and DNS records! | |
# 192.168.50.2 api.demo.cloud.example.com | |
# 192.168.50.2 api-int.demo.cloud.example.com | |
# 192.168.50.3 *.apps.demo.cloud.example.com | |
## | |
# install-config.yaml | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# User specific aliases and functions | |
HISTTIMEFORMAT="%d/%m/%y %T " | |
HISTSIZE=1000000 | |
HISTFILESIZE=1000000 | |
# source ~/bin/switch.sh | |
alias ll="ls -al" | |
alias sw=switch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# helm get manifest $RELEASE_NAME | yq -N eval '[.kind, .metadata.name] | join("/")' - | sort | |
helm get manifest $RELEASE_NAME | yq -N '[.kind,.metadata.name] | join("/") '| sort | \ | |
while read X; do \ | |
Y=$(kubectl get $X -o name 2>/dev/null); \ | |
test $? -eq 0 && Y="OK " || Y="MISSING"; \ | |
echo "$Y $X"; \ | |
done | |
# sample output: | |
MISSING ConfigMap/elastic-7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Use curl to test service loadbalancing on stateful and stateless services: | |
### simple: | |
# oc exec client -- curl -sS http://stateless:8080 | |
# | |
### automated: | |
# for i in $(seq 1 100); do oc exec client -- curl -sS http://stateless:8080 | head -n1; sleep 1; done | |
# for i in $(seq 1 100); do oc exec client -- curl -sS http://stateful:8080 | head -n1; sleep 1; done | |
apiVersion: v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
labels: | |
app.kubernetes.io/name: argocd-cm | |
app.kubernetes.io/part-of: argocd | |
name: argocd-cm | |
data: | |
resource.customizations: | | |
argoproj.io/Application: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To Decrypt Jenkins Password from credentials.xml | |
#<username>jenkins</username> | |
#<passphrase>your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J</passphrase> | |
#go to the jenkins url | |
http://jenkins-host/script | |
#In the console paste the script | |
hashed_pw='your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example showing how to patch Kubernetes resources. | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"k8s.io/apimachinery/pkg/runtime/schema" | |
types "k8s.io/apimachinery/pkg/types" | |
"k8s.io/client-go/dynamic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: batch/v1beta1 | |
kind: CronJob | |
metadata: | |
name: etcd-backup | |
spec: | |
schedule: "0 0 * * *" | |
jobTemplate: | |
spec: | |
template: |
java -XshowSettings:vm -XX:+PrintFlagsFinal -version
$ java -XshowSettings:vm -XX:+PrintFlagsFinal -version 2>&1 | \
grep -E 'GCTimeRatio|HeapFreeRatio|MaxRAM|MaxHeapSize|UnlockExperimentalVMOptions|UseCGroupMemoryLimitForHeap'
uintx DefaultMaxRAMFraction = 4 {product}
NewerOlder