Skip to content

Instantly share code, notes, and snippets.

View ravikyada's full-sized avatar
🎯
Focusing

Ravi Kyada ravikyada

🎯
Focusing
View GitHub Profile
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress-demo
labels:
app: user-service
annotations:
alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
alb.ingress.kubernetes.io/load-balancer-name: service-demo
alb.ingress.kubernetes.io/target-type: instance
apiVersion: apps/v1
kind: Deployment
metadata:
name: external-dns
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: external-dns
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: external-dns-viewer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: external-dns
subjects:
- kind: ServiceAccount
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services","endpoints","pods"]
verbs: ["get","watch","list"]
- apiGroups: ["extensions","networking.k8s.io"]
resources: ["ingresses"]
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets"
],
"Resource": [
@ravikyada
ravikyada / Google Chrome Shortcuts.md
Created January 17, 2025 07:13
Google Chrome Keyboard Shortcuts

Google Chrome Keyboard Shortcuts

General Navigation

  • Ctrl + T / Cmd + T: Open a new tab.
  • Ctrl + W / Cmd + W: Close the current tab.
  • Ctrl + Shift + T / Cmd + Shift + T: Reopen the last closed tab.
  • Ctrl + N / Cmd + N: Open a new window.
  • Ctrl + Shift + N / Cmd + Shift + N: Open a new incognito window.
  • Ctrl + Tab: Move to the next tab.
  • Ctrl + Shift + Tab: Move to the previous tab.
@ravikyada
ravikyada / sshpass.md
Created September 12, 2024 13:15
SSH Login Without Prompting for Password Using `sshpass`

SSH Without Prompting for Password

Configure SSH to avoid prompting for a password each time.

Problem Statement

Currently, after setting up SSH with a PEM file, you can access a server without a password like so:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets"
],
"Resource": [
@ravikyada
ravikyada / Readme.md
Created July 30, 2024 09:50
Bash Script to Create S3 Bucket with Public Website Hosting

S3 Bucket Setup Script

This script automates the process of setting up an S3 bucket in AWS. It performs the following tasks:

  1. Checks if the specified S3 bucket already exists.
  2. Creates the bucket if it does not exist.
  3. Removes Block Public Access settings from the bucket.
  4. Attaches a specified bucket policy to allow public read access.
  5. Configures CORS settings for the bucket.
  6. Enables static website hosting on the bucket.

Common Most Useful Terminal Commands

User Information

Show the current logged-in user.

whoami

Show the User details.