Skip to content

Instantly share code, notes, and snippets.

View ilanni2460's full-sized avatar

烂泥行天下 ilanni2460

View GitHub Profile
@shawnho1018
shawnho1018 / create-kubecfg.sh
Created June 23, 2019 08:09
快速生成kubeconfig方法
context=$1 #後端K8S Cluster的名稱
kubectl apply -f ./sa-admin.yaml # 執行
name=$(kubectl describe sa gimbal-sa --context=$context | grep Tokens | awk '{print $2}')
ca=$(kubectl get secret/$name -o jsonpath='{.data.ca\.crt}' --context=$context)
token=$(kubectl get secret/$name -o jsonpath='{.data.token}' --context=$context | base64 --decode)
namespace=$(kubectl get secret/$name -o jsonpath='{.data.namespace}' --context=$context | base64 --decode)
echo "
apiVersion: v1
@joseb0rges
joseb0rges / Creating Nginx RPM Package with Status Modules.md
Last active November 2, 2023 09:15
Creating Nginx RPM Package with Status Modules.md

Creating Nginx RPM Package with Status Modules

# - Dependencies

yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel geoip-devel rpm-build

# - Creating user to perform this process, as the same is not recommended with root user:

useradd -m rpmbuilder
@thilinapiy
thilinapiy / mongo-statefulset.yaml
Created October 27, 2017 12:21
MongoDB statefulset for kubernetes with authentication and replication
## Generate a key
# openssl rand -base64 741 > mongodb-keyfile
## Create k8s secrets
# kubectl create secret generic mongo-key --from-file=mongodb-keyfile
---
apiVersion: v1
kind: Service
metadata:
name: mongo
labels:
@nazarewk
nazarewk / ansible.cfg
Last active August 2, 2021 20:27
Ansible SSH Agent forwarding with Jump (bastion) host
[defaults]
sudo_flags = SSH_AUTH_SOCK="$SSH_AUTH_SOCK" -H -S -n
[ssh_connection]
ssh_args=-o ForwardAgent=yes