Skip to content

Commit

Permalink
add k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
supreethkurpad committed Aug 2, 2022
1 parent b1c1b98 commit 988eb49
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 0 deletions.
35 changes: 35 additions & 0 deletions kubernetes/HadoopDeployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hadoop-deployment
labels:
app: hadoop
spec:
replicas: 3
selector:
matchLabels:
app: hadoop

template:
metadata:
labels:
app: hadoop
spec:
volumes:
- name: hadoop-pv-storage
persistentVolumeClaim:
claimName: hadoop-pv-claim
containers:
- name: hadoop
image: hadoop-3.2.2:0.1
ports:
- containerPort: 10000
- containerPort: 9870
- containerPort: 8088
- containerPort: 10001
- containerPort: 9000
- containerPort: 6379
- containerPort: 19888
volumeMounts:
- mountPath: "/output"
name: hadoop-pv-storage
14 changes: 14 additions & 0 deletions kubernetes/HadoopPV.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: hadoop-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 20Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/c/Users/supre/backend-2022/output"
11 changes: 11 additions & 0 deletions kubernetes/HadoopPVC.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: hadoop-pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
51 changes: 51 additions & 0 deletions kubernetes/HadoopService.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: v1
kind: Service
metadata:
name: hadoop-service
spec:
type: LoadBalancer
selector:
app.kubernetes.io/name: hadoop-deployment
# type: LoadBalancer
ports:
- name: port1
port: 10000
targetPort: 10000
nodePort: 30007
protocol: TCP

- name: port2
port: 9870
targetPort: 9870
nodePort: 30008
protocol: TCP

- name: port3
port: 8088
targetPort: 8088
nodePort: 30009
protocol: TCP

- name: port4
port: 10001
targetPort: 10001
nodePort: 30010
protocol: TCP

- name: port5
port: 9000
targetPort: 9000
nodePort: 30011
protocol: TCP

- name: port6
port: 6379
targetPort: 6379
nodePort: 30012
protocol: TCP

- name: port7
port: 19888
targetPort: 19888
nodePort: 30013
protocol: TCP

0 comments on commit 988eb49

Please sign in to comment.