Skip to content

Instantly share code, notes, and snippets.

View alperen-selcuk's full-sized avatar

Hasan Alperen SELÇUK alperen-selcuk

View GitHub Profile
@alperen-selcuk
alperen-selcuk / containerd
Created October 3, 2022 10:59
containerd install
sudo su -
wget https://github.com/containerd/containerd/releases/download/v1.6.8/containerd-1.6.8-linux-amd64.tar.gz
tar Cxzvf /usr/local containerd-1.6.8-linux-amd64.tar.gz
wget https://github.com/opencontainers/runc/releases/download/v1.1.3/runc.amd64
install -m 755 runc.amd64 /usr/local/sbin/runc
wget https://github.com/containernetworking/plugins/releases/download/v1.1.1/cni-plugins-linux-amd64-v1.1.1.tgz
@alperen-selcuk
alperen-selcuk / cka-taint-tolerations.yaml
Created September 7, 2022 15:44
cka questions taint
## first taint on node##
## kubectl taint nodes node01 pod=allow:NoSchedule
apiVersion: v1
kind: Pod
metadata:
labels:
run: nginx
name: nginx
@alperen-selcuk
alperen-selcuk / cka-pv-pvc.yaml
Created September 7, 2022 14:50
cka questions pv-pvc
apiVersion: v1
kind: PersistentVolume
metadata:
name: my-pv
spec:
capacity:
storage: 2Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
@alperen-selcuk
alperen-selcuk / cka-multipod.yaml
Last active September 7, 2022 15:46
cka questions sidecar
apiVersion: v1
kind: Pod
metadata:
name: multi
spec:
containers:
- name: web
image: nginx:alpine
env:
- name: NODE_NAME
@alperen-selcuk
alperen-selcuk / nginx.con
Last active May 14, 2021 16:04
conf for lb
upstream loadbalance {
server 10.154.0.4:5001;
server 10.154.0.4:5002;
}
server {
location / {
proxy_pass http://loadbalance;
}
}
@alperen-selcuk
alperen-selcuk / app2.py
Last active May 14, 2021 14:09
app2 for lb
from flask import request, Flask
import json
app2 = Flask(__name__)
@app2.route('/')
def hello_world():
return 'this is response from app2'
@alperen-selcuk
alperen-selcuk / app1.py
Created May 14, 2021 11:28
app1 with lb
from flask import request, Flask
import json
app1 = Flask(__name__)
@app1.route('/')
def hello_world():
return 'this is response from app1'
@alperen-selcuk
alperen-selcuk / docker-ce.yaml
Last active April 28, 2021 09:38
docker-ce.yaml
---
- name: Install docker
hosts: swarm_hosts
become: true
tasks:
- name: Install pre-requisite packages
yum:
name: "{{item}}"
state: latest
loop:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: webapp-ingress
namespace: app
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels: