-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 74415c6
Showing
19 changed files
with
249 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM node:7 | ||
ADD app.js /app.js | ||
ENTRYPOINT ["node", "app.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Self study Kubernetes by reading and practicing K8s via Kubernetes in Action book. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const http = require('http'); | ||
const os = require('os'); | ||
|
||
console.log("Kubia server starting..."); | ||
|
||
var handler = function(request, response) { | ||
console.log("Received request from " + request.connection.remoteAddress); | ||
response.writeHead(200); | ||
response.end("You've hit " + os.hostname() + "\n"); | ||
}; | ||
|
||
var www = http.createServer(handler); | ||
www.listen(8080); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: batch/v1beta1 | ||
kind: CronJob | ||
metadata: | ||
name: batch-job-every-fifteen-minutes | ||
spec: | ||
schedule: "0, 15, 30, 45 * * * *" | ||
startingDeadlineSeconds: 15 | ||
jobTemplate: | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: periodic-batch-job | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: main | ||
image: luksa/batch-job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: custom-namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: batch-job | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: batch-job | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: main | ||
image: luksa/batch-job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: kubia-gpu | ||
spec: | ||
nodeSelector: | ||
gpu: "true" | ||
containers: | ||
- image: luksa/kubia | ||
name: kubia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: kubia-liveness | ||
spec: | ||
containers: | ||
- image: luksa/kubia-unhealthy | ||
name: kubia | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: 8080 | ||
initialDelaySeconds: 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: kubia-liveness | ||
spec: | ||
containers: | ||
- image: luksa/kubia-unhealthy | ||
name: kubia | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: kubia-manual-v2 | ||
labels: | ||
creation_method: manual | ||
env: prod | ||
spec: | ||
containers: | ||
- image: luksa/kubia | ||
name: kubia | ||
ports: | ||
- containerPort: 8080 | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: kubia-manual | ||
spec: | ||
containers: | ||
- image: luksa/kubia | ||
name: kubia | ||
ports: | ||
- containerPort: 8080 | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v1 | ||
kind: ReplicationController | ||
metadata: | ||
name: kubia | ||
spec: | ||
replicas: 3 | ||
selector: | ||
app: kubia | ||
template: | ||
metadata: | ||
labels: | ||
app: kubia | ||
spec: | ||
containers: | ||
- name: kubia | ||
image: luksa/kubia | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
- name: https | ||
containerPort: 8443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: apps/v1beta2 | ||
kind: ReplicaSet | ||
metadata: | ||
name: kubia | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchExpressions: | ||
- key: app | ||
operator: In | ||
values: | ||
- kubia | ||
template: | ||
metadata: | ||
labels: | ||
app: kubia | ||
spec: | ||
containers: | ||
- name: kubia | ||
image: luksa/kubia | ||
ports: | ||
- containerPort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: apps/v1beta2 | ||
kind: ReplicaSet | ||
metadata: | ||
name: kubia | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: kubia | ||
template: | ||
metadata: | ||
labels: | ||
app: kubia | ||
spec: | ||
containers: | ||
- name: kubia | ||
image: luksa/kubia | ||
ports: | ||
- containerPort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kubia-affinity | ||
spec: | ||
sessionAffinity: ClientIP | ||
ports: | ||
- port: 80 | ||
targetPort: 8080 | ||
selector: | ||
app: kubia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kubia | ||
spec: | ||
ports: | ||
- port: 80 | ||
targetPort: http | ||
name: http | ||
- name: https | ||
port: 443 | ||
targetPort: https | ||
selector: | ||
app: kubia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: multi-completion-batch-job | ||
spec: | ||
completions: 5 | ||
template: | ||
metadata: | ||
labels: | ||
app: batch-job | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: main | ||
image: luksa/batch-job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: multi-completion-batch-job-parallel | ||
spec: | ||
completions: 5 | ||
parallelism: 2 | ||
template: | ||
metadata: | ||
labels: | ||
app: batch-job | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: main | ||
image: luksa/batch-job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: apps/v1beta2 | ||
kind: DaemonSet | ||
metadata: | ||
name: ssd-monitor | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: ssd-monitor | ||
template: | ||
metadata: | ||
labels: | ||
app: ssd-monitor | ||
spec: | ||
nodeSelector: | ||
disk: ssd | ||
containers: | ||
- name: main | ||
image: luksa/ssd-monitor |