Skip to content

Instantly share code, notes, and snippets.

View yunusemrecatalcam's full-sized avatar

yech yunusemrecatalcam

View GitHub Profile
@yunusemrecatalcam
yunusemrecatalcam / restarted_cronjob.yaml
Created September 7, 2023 14:13
stack to restart a deployment on kubernetes periodically - cronjob
apiVersion: v1
kind: ServiceAccount
metadata:
name: restart-deployment-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: prod
name: deployment-restarter
@yunusemrecatalcam
yunusemrecatalcam / gist:f9c185da3cb049aa500878c5a250b489
Created June 11, 2021 09:58
Creating a self managed kubernetes on aws ec2, integrated with aws-ebs
Spin up an ec2, add KubernetesCluster=kubernetes tag, you can change the name but you should pass it to the kubeadm init.
Login to the ec2 and install them;
sudo apt-get update
sudo apt-get install docker.io -y
sudo apt-get install apt-transport-https curl -y
wget https://packages.cloud.google.com/apt/doc/apt-key.gpg
sudo apt-key add apt-key.gpg
sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
sudo apt-get install kubeadm -y
import twint
import requests
# Lookup
c = twint.Config()
c.Username = 'riotgames'
c.Store_object = True
c.Store_object_users_list = []
c.User_full = True
c.User_id = None