Skip to content

Instantly share code, notes, and snippets.

View Jonsy13's full-sized avatar
:octocat:
Working from home

Vedant Shrotria Jonsy13

:octocat:
Working from home
View GitHub Profile
@Jonsy13
Jonsy13 / Netfilter-IPTables-Diagrams.md
Created March 29, 2022 08:19 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@Jonsy13
Jonsy13 / components.yaml
Created June 24, 2021 19:04
Modified Components.yaml file of Metrics-server, which can be used with KIND Cluster.
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@Jonsy13
Jonsy13 / kind-metrics-server.yaml
Created June 6, 2021 14:05 — forked from hjacobs/kind-metrics-server.yaml
Metrics Server API deployment manifests for Kubernetes kind
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:aggregated-metrics-reader
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups: ["metrics.k8s.io"]
@Jonsy13
Jonsy13 / kubectl.md
Created May 31, 2021 14:14 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@Jonsy13
Jonsy13 / expecting.md
Created May 12, 2021 18:07 — forked from ksafranski/expecting.md
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
@Jonsy13
Jonsy13 / LitmusCTLTest.sh
Last active May 13, 2021 08:50
Script for automating the External Agent Registration Tests Using LitmusCTL
#!/usr/bin/expect -f
## [STILL IN DEVELOPMENT]
## Prerequisites
# litmusctl should have the permissions to create role/rolebindings
# expect should be installed on user's system
## expect is used for expecting an interactive prompts.
## send is used for sending inputs to the prompts.