Skip to content

Commit

Permalink
othe changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienblanc committed Apr 12, 2023
1 parent 026bad3 commit 79dde04
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

.odo
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,34 @@ selector:

Save and exit.

## ConfigMap

`kubectl set env deployment/devoxxfr23-v2 GREETING=hola`

`kubectl create cm my-config --from-env-file=my.properties`

`kubectl apply -f manifests/devoxxfr23-v1-deployment-configmap`

## Secret

`kubectl create secret generic mysecret --from-literal=user='MyUserName' --from-literal=password='mypassword'`

`kubectl get secret mysecret -o yaml`

`kubectl replace -f manifests/devoxxfr23-v1-deployment-secrets.yml`

## Taint

`kubectl describe nodes | egrep "Name:|Taints:"`

`kubectl taint nodes --all=true color=blue:NoSchedule`

`kubectl taint node devnation-m02 color:NoSchedule- `

`kubectl taint nodes --all=true color=blue:NoSchedule --overwrite`

`kubectl label nodes devnation-m02 color=blue `




42 changes: 42 additions & 0 deletions manifests/devoxxfr23-v1-deployment-affinity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: devoxxfr23
name: devoxxfr23
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: devoxxfr23
app.kubernetes.io/version: "1.0"
template:
metadata:
labels:
app.kubernetes.io/name: devoxxfr23
app.kubernetes.io/version: "1.0"
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: color
operator: In
values:
- blue
containers:
- image: sebi2706/devoxxfr23:1.0
imagePullPolicy: Always
name: devoxxfr23
ports:
- containerPort: 8080
name: http
protocol: TCP
resources:
requests:
memory: "300Mi"
cpu: "750m" # 10 cores
limits:
memory: "500Mi"
cpu: "1000m"
42 changes: 42 additions & 0 deletions manifests/devoxxfr23-v1-deployment-secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: devoxxfr23
name: devoxxfr23
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: devoxxfr23
app.kubernetes.io/version: "1.0"
template:
metadata:
labels:
app.kubernetes.io/name: devoxxfr23
app.kubernetes.io/version: "1.0"
spec:
containers:
- image: sebi2706/devoxxfr23:1.0
imagePullPolicy: Always
name: devoxxfr23
ports:
- containerPort: 8080
name: http
protocol: TCP
resources:
requests:
memory: "300Mi"
cpu: "750m" # 10 cores
limits:
memory: "500Mi"
cpu: "1000m"
volumeMounts:
- name: mysecretvolume
mountPath: /mystuff/secretstuff
readOnly: true
volumes:
- name: mysecretvolume
secret:
secretName: mysecret

38 changes: 38 additions & 0 deletions manifests/devoxxfr23-v1-deployment-toleration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: devoxxfr23
name: devoxxfr23
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: devoxxfr23
app.kubernetes.io/version: "1.0"
template:
metadata:
labels:
app.kubernetes.io/name: devoxxfr23
app.kubernetes.io/version: "1.0"
spec:
tolerations:
- key: "color"
operator: "Equal"
value: "blue"
effect: "NoSchedule"
containers:
- image: sebi2706/devoxxfr23:1.0
imagePullPolicy: Always
name: devoxxfr23
ports:
- containerPort: 8080
name: http
protocol: TCP
resources:
requests:
memory: "300Mi"
cpu: "750m" # 10 cores
limits:
memory: "500Mi"
cpu: "1000m"
1 change: 1 addition & 0 deletions my.propreties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GREETING=halloooo

0 comments on commit 79dde04

Please sign in to comment.