Skip to content

Instantly share code, notes, and snippets.

View iamjjanga-ouo's full-sized avatar
๐Ÿต
i can do this all day

LeeSihyung iamjjanga-ouo

๐Ÿต
i can do this all day
View GitHub Profile
@iamjjanga-ouo
iamjjanga-ouo / send-alert-manualy.sh
Created December 1, 2024 12:41
[kubernetes/alertmanager]
#!/bin/bash
# Set default values
name=$RANDOM
url='https://alertmanager.local/api/v1/alerts'
summary='Testing summary!'
instance="$name.example.net"
default_severity='warning'
# Function to send alert
@iamjjanga-ouo
iamjjanga-ouo / note.md
Last active November 27, 2024 07:13
[kubernetes/chore] #kubernetes

[Test] Create test curl pod in one-line

k run curl-test --image=radial/busyboxplus:curl -i --tty --rm

[Test] Create pod with sleep infinity

k run my-pod --image=python -n default -- sleep infinity

[Test] Netcat Pod

k run netcat-test --image=subfuzion/netcat --command -- sleep 360000

[Test] aws-cli Pod

@iamjjanga-ouo
iamjjanga-ouo / cheatsheet.md
Last active July 16, 2024 13:57
[kubernetes/nginx-ingress]

[Version] Get Nginx Ingress Controller Version

kubectl get pods -n ingress-nginx | awk '{ print $1 }' | grep 'ingress-nginx-controller' | xargs -I % sh -c 'kubectl get pods % -n ingress-nginx -o yaml | grep image:'
@iamjjanga-ouo
iamjjanga-ouo / snippets.md
Last active July 16, 2024 13:57
[etc/github-pages] hugo commands

Debug

  • $ hugo server or $ hugo server -D http://localhost:1313/์—์„œ ๋””๋ฒ„๊ทธ ์šฉ๋„๋กœ ์‚ฌ์šฉ(watch files)
    • -D ์˜ต์…˜์€ draft๋กœ ์‹คํ–‰๋จ

Write contents

  • $ hugo new post/test1.md ๋ช…๋ น์œผ๋กœ ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๋ฉด \content\post\test1.md์— ์ƒ์„ฑ
@iamjjanga-ouo
iamjjanga-ouo / create-aws-ecr-authentication-cronjob.md
Last active July 16, 2024 13:58 — forked from tuantranf/create-aws-ecr-authentication-cronjob.md
[kubernetes/aws/ecr] A Kubernetes cronjob to refresh ECR authentication #kubernetes #aws/ecr

A Kubernetes cronjob to refresh ECR authentication

Create AWS secret

kubectl create secret generic aws-secret --from-literal=AWS_ACCOUNT= --from-literal=AWS_ACCESS_KEY_ID= --from-literal=AWS_SECRET_ACCESS_KEY= --from-literal=AWS_DEFAULT_REGION= --from-literal=AWS_REGION=

Create cronjob

@iamjjanga-ouo
iamjjanga-ouo / aws_login.yml
Last active July 16, 2024 13:59 — forked from tedivm/aws_login.yml
[github/github-action/aws-ecr-oidc] AWS ECR Github Actions OIDC #github-action
jobs:
deploy:
name: Push to ECR
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
@iamjjanga-ouo
iamjjanga-ouo / Vagrant-M1-Install.bash
Last active July 16, 2024 14:00 — forked from beauwilliams/Vagrant-M1-Install.bash
[tool/vagrant] Run x86 VM's on Mac M1 arm using vagrant with qemu hypervisor #vagrant
brew install vagrant qemu
#Due to dependency errors, we must install vbguest first..
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-qemu
#cd to working dir you like to keep your vagrant files
cd ~/VM-and-containers/VagrantMachines/M1-vagrantfiles/ubuntu18-generic-64/
#Create a vagrant file
$EDITOR Vagrantfile
@iamjjanga-ouo
iamjjanga-ouo / note.md
Last active July 16, 2024 13:51
[linux/command/du] `du` command #linux

du examples


find all files(include hidden) size in cwd

$ du -sch .[!.]* * |sort -h
# =======OUTPUT
@iamjjanga-ouo
iamjjanga-ouo / node.md
Last active July 16, 2024 14:00
[redis/redis-cli]

get role

  • redis-cli
$ redis-cli -h <redis host> -p <port> info | grep role
role: master