Skip to content

Commit

Permalink
Add minikube example
Browse files Browse the repository at this point in the history
  • Loading branch information
whs-dot-hk committed Feb 17, 2019
1 parent 33936bd commit 26f01df
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,13 @@ $ kubectl port-forward $POD_NAME 8080:8080

Visit http://localhost:8080/nifi

## Minikube Example
![alt text](minikube.png "Minikube")

```
$ kubectl create -f https://raw.githubusercontent.com/whs-dot-hk/kubernetes-nifi-refined/master/nifi-statefulset-minikube.yaml
$ kubectl create -f https://raw.githubusercontent.com/whs-dot-hk/kubernetes-nifi-refined/master/nifi-service.yaml
$ kubectl create -f https://raw.githubusercontent.com/whs-dot-hk/kubernetes-nifi-refined/master/frontend.yaml<Paste>
```

Example usage: https://bitbucket.org/whshk/kubernetes-logging/src/master
Binary file added minikube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions nifi-statefulset-minikube.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
apiVersion: v1
kind: Service
metadata:
name: nifi-headless
labels:
app: nifi
spec:
ports:
- port: 8080
name: http
clusterIP: None
selector:
app: nifi
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nifi
spec:
selector:
matchLabels:
app: nifi
tier: backend
track: stable
serviceName: nifi-headless
replicas: 1
template:
metadata:
labels:
app: nifi
tier: backend
track: stable
spec:
containers:
- name: nifi
image: whshk/nifi:latest
ports:
- name: http
containerPort: 8080
volumeMounts:
- name: nifi-data
mountPath: /opt/nifi/nifi-current/conf
subPath: conf
- name: nifi-data
mountPath: /opt/nifi/nifi-current/logs
subPath: logs
- name: nifi-data
mountPath: /opt/nifi/nifi-current/database_repository
subPath: database_repository
- name: nifi-data
mountPath: /opt/nifi/nifi-current/flowfile_repository
subPath: flowfile_repository
- name: nifi-data
mountPath: /opt/nifi/nifi-current/content_repository
subPath: content_repository
- name: nifi-data
mountPath: /opt/nifi/nifi-current/provenance_repository
subPath: provenance_repository
- name: nifi-data
mountPath: /opt/nifi/nifi-current/state
subPath: state
securityContext:
runAsUser: 1000
fsGroup: 1000
volumeClaimTemplates:
- metadata:
name: nifi-data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "standard"
resources:
requests:
storage: 10Gi

0 comments on commit 26f01df

Please sign in to comment.