Skip to content

Instantly share code, notes, and snippets.

View Nurlan199206's full-sized avatar
🎯
Focusing

Nurlan199206

🎯
Focusing
View GitHub Profile
1) [2024-09-26 18:14:41,186] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
java.lang.RuntimeException: No readable meta.properties files found.
2) cd /tmp
mkdir kraft-combined-logs
touch kraft-combined-logs/meta.properties
3) ./bin/kafka-storage.sh random-uuid
output: fWDamvz8T0-dLH0IFQP2Wg
@Nurlan199206
Nurlan199206 / vmware.md
Created February 14, 2025 11:35 — forked from ayebrian/vmware.md
VMware ESXi 8 / vCenter 8 / Workstation 17 license key 2024
# <secret_cookie_auth_key> - 32 bytes string (regex: a-z0-9, example: rpb7aos4rd0m32x9omcrcqacnia0xty2)
# <secret_cookie_enc_key> - 32 bytes string (regex: a-z0-9, example: gg1ejofgupoc19wyuywr2yflm75aeiwg)
#
# prom rules:
# - name: ForOpenshiftConsole
# rules:
# - expr: sum(rate(container_cpu_usage_seconds_total{job="kubelet",container!="",container!="POD"}[2m])) by (namespace,pod)
# record: pod:container_cpu_usage:sum
# - expr: sum(kube_pod_container_resource_requests{container!=""}) by (namespace, pod, resource)
# record: kube_pod_resource_request
@Nurlan199206
Nurlan199206 / handshake failed: ssh: unable to authenticate, attempted methods [none publickey]
Created November 7, 2024 10:29
handshake failed: ssh: unable to authenticate, attempted methods [none publickey]
gitlab-runner ssh executor
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
HOW TO FIX:
cat /home/user/.ssh/id_rsa.pub >> /home/user/.ssh/authorized_keys
Y,X,Y Y,X <== ===> Y COMBO 2 ERMAC
down, left + A + RT в воздухе
X,Y,A + захват
============================HOMELANDER===============================
<=== A, <=== X,B,A
@Nurlan199206
Nurlan199206 / helm examples
Last active April 19, 2024 18:40
helm examples
helm install prometheus-stack prometheus-community/kube-prometheus-stack --version 58.2.0 --namespace=monitoring --create-namespace
helm upgrade --install prometheus-stack prometheus-community/kube-prometheus-stack --version 58.2.0 --namespace=monitoring -f values.yaml
=====================================================================================================================================
helm install prometheus-community/prometheus:v2.41.0 --namespace=monitoring --debug --dry-run
helm install nginx --namespace=default --debug --set image.name=nurlan1992/app:v1 -f values.yaml .
helm upgrade --debug --install nginx --namespace=default --set image.name=nurlan1992/app:v1 -f values.yaml .
Get Active Directory certificate
1. openssl s_client -showcerts -connect 192.168.1.155:636
2. copy cert output from previous command and save to your root keycloak truststores location! for example: /opt/keycloak/conf/truststores
2. mcedit /path/keycloak/bin/kc.sh
3. if you gettins SSL error when connecting to LDAP server:
In JAVA_OPTS add to the end of the line -Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true
@Nurlan199206
Nurlan199206 / gist:28d6d98f229cb62643a7bcfbd9799f8a
Last active March 30, 2024 16:04
OKD console OIDC integration
Vanilla OKD Console integration with Keycloak OIDC
Software version:
Keycloak: 23.0.7
Kubernetes: 1.26.5
# Run Keycloak on port 443 with custom domain
1) bash kc.sh start-dev --https-certificate-file=/etc/letsencrypt/live/auth.dev-ops.kz/fullchain.pem --https-certificate-key-file=/etc/letsencrypt/live/auth.dev-ops.kz/privkey.pem --https-port=443
@Nurlan199206
Nurlan199206 / add new context to k8s
Last active March 2, 2024 18:33
add new context to k8s
openssl genrsa -out deployer.key 2048
openssl req -new -key deployer.key -out deployer.csr -subj "/CN=deployer"
cat deployer.csr | base64 | tr -d "\n"
cat <<EOF | kubectl apply -f -
apiVersion: certificates.k8s.io/v1
kind: CertificateSigningRequest
metadata:
name: deployer
@Nurlan199206
Nurlan199206 / patroni logrotate
Created February 2, 2024 04:01
patroni logrotate
/etc/logrotate.d/postgresql-common
/var/log/postgresql/*.log {
hourly
rotate 3
size 5M
compress
notifempty
missingok
nocreate