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 / note.md
Created July 16, 2024 13:55
[kubernetes/chore] #kubernetes

[Test] Create test curl pod in one-line

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

[Test] Create pod with sleep infinity

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

@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
@iamjjanga-ouo
iamjjanga-ouo / note.md
Last active July 16, 2024 13:50
[python/pipenv] #python #package-manager

pipenv?

  • 파이썬에서도 패키지를 프로젝트 단위로 관리할 수 있도록 도와주는 패키지 관리 도구
  • 기본적으로 pip기반으로 동작
  • 프로젝트별 격리된 가상환경(virtual environment)제공

install

# mac
$ brew install pipenv