Skip to content

Instantly share code, notes, and snippets.

View nitinsatish's full-sized avatar
🎯
Focusing

Nitin nitinsatish

🎯
Focusing
View GitHub Profile
@nitinsatish
nitinsatish / test_deployment.yaml
Created May 14, 2024 11:13
[Kubernetes deployment for testing using ubuntu] #k8s
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-client
namespace: test-client
spec:
selector:
matchLabels:
app: test-client

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@nitinsatish
nitinsatish / kubectl_up.md
Created March 12, 2024 10:00
[kubectl upgrade] #kubectl

Set version

kubectl_version='1.29.2'

Install

curl -LO https://dl.k8s.io/v${kubectl_version}/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv ./kubectl /usr/bin/kubectl
@nitinsatish
nitinsatish / cert_string_awk.md
Created June 7, 2023 12:08
[tls certificate to string] #tls #ssl #cert
awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' FILENAME
@nitinsatish
nitinsatish / zombie.py
Created February 12, 2023 11:18
[Create zombie in python] #python
import os, sys, time
pid = os.fork()
if pid == 0 :
print("in child")
sys.exit(0)
else :
print("in parent")
time.sleep(90)
@nitinsatish
nitinsatish / git_file_search.md
Created January 11, 2023 11:58
[Git search filenames] #git #search
git ls-files '*/<FILENAME>'
git ls-files '**/argo-admin-clusterrole.yaml'
git ls-files '*argo-admin-clusterrole.yaml'
@nitinsatish
nitinsatish / read_from_kafka.md
Created November 16, 2022 07:07
[Read messages from Kafka] #kafka

bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic --from-beginning

In kafka container: cd /opt/bitnami/kafka/bin

@nitinsatish
nitinsatish / instance_filtering.md
Created November 2, 2022 11:50 — forked from sahilsk/instance_filtering.md
boto3, python, aws, instance filtering

Source

Russell Ballestrini

– Filtering AWS resources with Boto3

This post will be updated frequently when as I learn more about how to filter AWS resources using Boto3 library.

Filtering VPCs by tags

@nitinsatish
nitinsatish / k8s_shell.md
Last active January 4, 2023 10:24
[k8s container with interactive shell] #kubernetes #k8s

Ubuntu

kubectl run my-shell --rm -it --restart=Never --image ubuntu -- bash

Netshoot

kubectl run tmp-shell --rm -it --image nicolaka/netshoot