Skip to content

Instantly share code, notes, and snippets.

View ssbostan's full-sized avatar

Saeid Bostandoust ssbostan

  • London
View GitHub Profile
@ssbostan
ssbostan / dns4.yaml
Created July 17, 2023 10:34
Kubernetes Hacks and Tricks - #5 Pod DNS Policy and DNS Config options
apiVersion: v1
kind: Service
metadata:
name: test
spec:
type: ClusterIP
ports:
- port: 80
---
apiVersion: v1
@ssbostan
ssbostan / when10.jenkins
Created June 23, 2023 07:30
Jenkins pipeline syntax reference
pipeline {
agent any
stages {
stage("Test") {
when {
beforeAgent true
beforeInput true
beforeOptions true
// Write your conditions here. For example:
equals(actual: currentBuild.number, expected: 1)
@ssbostan
ssbostan / podpc.yaml
Created April 17, 2023 14:57
Kubernetes Hacks and Tricks - #8 Pod Preemption, Eviction and Priority classes
apiVersion: v1
kind: Pod
metadata:
name: test
labels:
app.kubernetes.io/created-by: ssbostan
spec:
priorityClassName: dev-pc
containers:
- name: test
@ssbostan
ssbostan / priorityclass.yaml
Created April 17, 2023 14:24
Kubernetes Hacks and Tricks - #8 Pod Preemption, Eviction and Priority classes
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: default-pc
labels:
app.kubernetes.io/created-by: ssbostan
description: Priority class to run all pods without priority class name
globalDefault: true
preemptionPolicy: Never
value: 10000
@ssbostan
ssbostan / guaranteed.yaml
Created March 30, 2023 16:48
Kubernetes Hacks and Tricks - #7 Pod and Container Resource and QoS classes
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-guaranteed
spec:
replicas: 15
selector:
matchLabels:
app: test-guaranteed
template:
@ssbostan
ssbostan / burstable.yaml
Created March 30, 2023 13:31
Kubernetes Hacks and Tricks - #7 Pod and Container Resource and QoS classes
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-burstable
spec:
replicas: 15
selector:
matchLabels:
app: test-burstable
template:
@ssbostan
ssbostan / besteffort.yaml
Created March 30, 2023 12:18
Kubernetes Hacks and Tricks - #7 Pod and Container Resource and QoS classes
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-besteffort
spec:
replicas: 10
selector:
matchLabels:
app: test-besteffort
template:
@ssbostan
ssbostan / dns3.yaml
Created March 11, 2023 22:58
Kubernetes Hacks and Tricks - #5 Pod DNS Policy and DNS Config options
apiVersion: v1
kind: Service
metadata:
name: test
spec:
type: ClusterIP
ports:
- port: 80
---
apiVersion: v1
@ssbostan
ssbostan / dns2.yaml
Created March 11, 2023 22:07
Kubernetes Hacks and Tricks - #5 Pod DNS Policy and DNS Config options
apiVersion: v1
kind: Service
metadata:
name: test
spec:
type: ClusterIP
ports:
- port: 80
---
apiVersion: v1
@ssbostan
ssbostan / dns1.yaml
Created March 11, 2023 22:07
Kubernetes Hacks and Tricks - #5 Pod DNS Policy and DNS Config options
apiVersion: v1
kind: Service
metadata:
name: test
spec:
type: ClusterIP
ports:
- port: 80
---
apiVersion: v1