Skip to content

Commit 78fb5b1

Browse files
committed
adding namespace, quota, batch jobs
1 parent 40d846e commit 78fb5b1

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

dev-namespace.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: development
5+
labels:
6+
name: development

quota-wildfly.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: wildfly-pod
5+
labels:
6+
name: wildfly
7+
spec:
8+
containers:
9+
- image: jboss/wildfly
10+
name: wildfly-pod

readme.adoc

+18
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,24 @@ https://github.com/arun-gupta/kubernetes-java-sample/tree/master/rolling-update
7777
. List all resources in all namespaces: `kubectl.sh get deployments --all-namespaces`
7878
. Show pods in the namespaces: `kubectl.sh get pods --all-namespaces`
7979

80+
== Quota
81+
82+
. Create a constrained resource: `kubectl.sh create -f quota-wildfly.yaml`
83+
. Check for pods: `kubectl.sh get -w pods`
84+
. TBD
85+
86+
== Run-once/Batch Jobs
87+
88+
. Create a job: `kubectl.sh create -f runonce-job.yaml`
89+
. Check jobs: `kubectl.sh get jobs`
90+
. More details about job: `kubectl.sh describe jobs wait`
91+
. Check pods: `kubectl.get pods`
92+
. Show all completed pods: `kubectl.sh get pods --show-all`
93+
94+
== Couchbase Cluster
95+
96+
https://github.com/arun-gupta/couchbase-kubernetes/tree/master/cluster
97+
8098
=== Tips
8199

82100
. Create resources in all `.json`, `.yaml` and `.yml` files in dir: `kubectl.sh create -f ./dir`

runonce-job.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
name: wait
5+
spec:
6+
template:
7+
metadata:
8+
name: wait
9+
spec:
10+
containers:
11+
- name: wait
12+
image: ubuntu
13+
command: ["sleep", "20"]
14+
restartPolicy: Never

0 commit comments

Comments
 (0)