From a9d199218a46e5fd05ebbfd98d426e7015976f69 Mon Sep 17 00:00:00 2001 From: Maziar Date: Fri, 11 Jun 2021 00:22:32 +0430 Subject: [PATCH 1/2] initial helm chart --- README.md | 51 ++++ appbaseio/.helmignore | 23 ++ appbaseio/Chart.yaml | 14 + appbaseio/templates/NOTES.txt | 17 ++ appbaseio/templates/_helpers.tpl | 62 +++++ appbaseio/templates/appbaseio.yaml | 71 ++++++ appbaseio/templates/cert.yaml | 12 + appbaseio/templates/fluentbit.yaml | 140 ++++++++++ appbaseio/templates/ingress-nginx.yaml | 239 ++++++++++++++++++ .../templates/tests/test-connection.yaml | 15 ++ appbaseio/templates/volumes.yaml | 38 +++ appbaseio/values.yaml | 75 ++++++ 12 files changed, 757 insertions(+) create mode 100644 appbaseio/.helmignore create mode 100644 appbaseio/Chart.yaml create mode 100644 appbaseio/templates/NOTES.txt create mode 100644 appbaseio/templates/_helpers.tpl create mode 100644 appbaseio/templates/appbaseio.yaml create mode 100644 appbaseio/templates/cert.yaml create mode 100644 appbaseio/templates/fluentbit.yaml create mode 100644 appbaseio/templates/ingress-nginx.yaml create mode 100644 appbaseio/templates/tests/test-connection.yaml create mode 100644 appbaseio/templates/volumes.yaml create mode 100644 appbaseio/values.yaml diff --git a/README.md b/README.md index 824d219d..ddb52aa5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,54 @@ # helm-charts Helm charts for appbase.io, an API gateway for a supercharged Elasticsearch experience. +Via this Helm Chart you can localize Appbaseio on your kubernetes engine. + +## Requirements +You should have your **Kubernetes** cluster installed and configured and then you should install [helm]("https://helm.sh/docs/intro/install/") + +As Arc is an API gateway for your Elasticsearch, make sure that you already have an Elasticsearch cluster with it's basic credentials. + +If you don't have an Elasticsearch cluster, you can use this [guid]("https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html") + +## Quick start +1- Clone this repositoy: + +`git clone git@github.com:appbaseio/helm-charts.git` + +and then head to `helm-charts` folder. + + +2- Now you should config helm chart to connect appbaseio to your elasticsearch: + +open **values.yaml** from `helm-charts/appbaseio/values.yaml` and fill the values you might need. +These are required values you must fill: + +- **Elasticsearch Domain**: This can be your Kubernetes service name or a valid domain which is reachble from your kubernetese cluster +- **Elasticsearch Username**: by default this username is `elastic` but if you have changed your ES_USERNAME, should change it here +- **Elasticsearch Password**: this is your decrypted password which you can leave empty here as we can change it while installing our helm chart. we will see that in following. +- **APPBASE_ID**: to get this, head to [Appbase]("https://arc-dashboard.appbase.io/install") and enter your email, You will receive an OTP on an entered email address. Enter OTP to verify the email address and then `APPBASE_ID` will be sent to our email. + +- **APPBASE_USERNAME**: This will be used while using appbaseio so you can choose your desired username by filling the variable +- **APPBASE_PASSWORD**: This will be used while using appbaseio so you can choose your desired password by filling the variable + +you can leave other settings as their default value but if you want more setting like use your own volume as storage, use SSL certificate for your Appbase cluster and so on, modify the related part. + +**Note:** +- handle arc version in Chart.yaml as **appVersion** + +3- We can set above values while running helm chart install command, the value will be replaced with what we have in values.yaml for example here we install appbase chart with setting the ES_PASSWORD + +- If you have a Kubernetes cluster, run below command : + +`PASSWORD=$(kubectl get secret -o go-template='{{.data.elastic | base64decode}}')` + + This Command will get ES_PASSWORD from ES secret, make sure to change your elasticsearch service name + +Now it's time to install our chart: + +`helm install appbaseio appbaseio/ --values appbaseio/values.yaml --set elasticsearch.esPassword=$PASSWORD ` + +To get more information about set value in helm install, take a look at this [page]("https://helm.sh/docs/helm/helm_install/") +4- Wait until your pods are in "Running" stat (see their status by `kubectl get pods`) and the LoadBalancer service is up and have an external IP (use this command: `kubectl get svc --namespace ingress-nginx`) + +When everything is OK you can access your Appbase with LoadBalancer IP and it's Port then you can go to [Arc dashboard]("https://arc-dashboard.appbase.io/login") to handle your elasticsearch visually diff --git a/appbaseio/.helmignore b/appbaseio/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/appbaseio/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/appbaseio/Chart.yaml b/appbaseio/Chart.yaml new file mode 100644 index 00000000..ae174b42 --- /dev/null +++ b/appbaseio/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: appbaseio +description: A Helm chart for Kubernetes + +type: application +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "7.45.0-beta" diff --git a/appbaseio/templates/NOTES.txt b/appbaseio/templates/NOTES.txt new file mode 100644 index 00000000..c423d723 --- /dev/null +++ b/appbaseio/templates/NOTES.txt @@ -0,0 +1,17 @@ +1. Get the application URL by running these commands: + +{{- if contains "NodePort" .Values.arc.serviceType }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ .Values.arc.name }} }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.arc.serviceType}} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ .Values.arc.name}}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ .Values.arc.name }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.arc.port }} +{{- else if contains "ClusterIP" .Values.arc.serviceType }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ .Values.arc.name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/appbaseio/templates/_helpers.tpl b/appbaseio/templates/_helpers.tpl new file mode 100644 index 00000000..88347a82 --- /dev/null +++ b/appbaseio/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "appbaseio.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "appbaseio.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "appbaseio.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "appbaseio.labels" -}} +helm.sh/chart: {{ include "appbaseio.chart" . }} +{{ include "appbaseio.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "appbaseio.selectorLabels" -}} +app.kubernetes.io/name: {{ include "appbaseio.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "appbaseio.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "appbaseio.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/appbaseio/templates/appbaseio.yaml b/appbaseio/templates/appbaseio.yaml new file mode 100644 index 00000000..ef1f6433 --- /dev/null +++ b/appbaseio/templates/appbaseio.yaml @@ -0,0 +1,71 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + name: {{ .Values.arc.name }} + annotations: + deployment.kubernetes.io/revision: "1" + generation: 1 + name: {{ .Values.arc.name }} +spec: + selector: + matchLabels: + app: {{ .Values.arc.name }} + strategy: + type: RollingUpdate + template: + metadata: + creationTimestamp: null + labels: + app: {{ .Values.arc.name }} + spec: + containers: + - env: + - name: USERNAME + value: {{ .Values.appbase.username }} + - name: PASSWORD + value: {{ .Values.appbase.password }} + - name: APPBASE_ID + value: {{ .Values.appbase.id }} + - name: ES_CLUSTER_URL + {{ if .Values.elasticsearch.port}} + value: "http://{{.Values.elasticsearch.defUsername}}:{{.Values.elasticsearch.esPassword}}@{{ .Values.elasticsearch.clusterDomain }}:{{.Values.elasticsearch.port}}/" + {{else if empty .Values.elasticsearch.port}} + value: "http://{{.Values.elasticsearch.defUsername}}:{{.Values.elasticsearch.esPassword}}@{{ .Values.elasticsearch.clusterDomain }}/" + {{end}} + - name: LOG_FILE_PATH + value: "/mnt/data/es.json" + image: {{.Values.arc.image}}:{{.Values.arc.tag | default .Chart.AppVersion}} + imagePullPolicy: IfNotPresent + name: {{ .Values.arc.name }} + ports: + - containerPort: {{ .Values.arc.port }} + name: http + protocol: TCP + volumeMounts: + - name: arcdata + mountPath: /mnt/data + subPath: es.json + volumes: + - name: arcdata + persistentVolumeClaim: + claimName: {{ .Values.volume.pvcName }} + + replicas: {{ .Values.arc.nodes }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.arc.name }} + labels: + app: {{ .Values.arc.name }} +spec: + type: {{ .Values.arc.serviceType }} + ports: + - port: {{ .Values.arc.port }} + targetPort: {{ .Values.arc.port }} + {{ if .Values.arc.nodePort }} + nodePort: {{ .Values.arc.nodePort | default 30007 }} + {{ end }} + selector: + app: {{ .Values.arc.name }} \ No newline at end of file diff --git a/appbaseio/templates/cert.yaml b/appbaseio/templates/cert.yaml new file mode 100644 index 00000000..ebe4447f --- /dev/null +++ b/appbaseio/templates/cert.yaml @@ -0,0 +1,12 @@ +{{ if .Values.cert.tlsCrt}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.cert.name }} +type: Opaque +data: + tls.crt: {{ .Values.cert.tlsCrt }} + tls.key: {{ .Values.cert.tlsKey }} + ca.crt: {{ .Values.cert.caCrt }} + +{{ end }} \ No newline at end of file diff --git a/appbaseio/templates/fluentbit.yaml b/appbaseio/templates/fluentbit.yaml new file mode 100644 index 00000000..254ced2a --- /dev/null +++ b/appbaseio/templates/fluentbit.yaml @@ -0,0 +1,140 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: fluent-bit +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: fluent-bit-read +rules: + - apiGroups: [""] + resources: + - namespaces + - pods + verbs: ["get", "list", "watch"] +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: fluent-bit-config + labels: + k8s-app: fluent-bit +data: + fluent-bit.conf: | + [SERVICE] + Flush 1 + Daemon off + Log_Level trace + Parsers_File parsers.conf + [INPUT] + Name tail + Path /mnt/data/es.json + Buffer_Chunk_Size 3MB + Buffer_Max_Size 487MB + [FILTER] + Name parser + Parser docker + Match * + Key_Name log + Reserve_Data true + [FILTER] + Name throttle + Match * + Rate 15 + Window 10 + Interval 15s + [OUTPUT] + Name es + Match * + Host {{.Values.elasticsearch.clusterDomain}} + Port {{.Values.elasticsearch.port}} + Index .logs + Type _doc + Generate_ID true + tls Off + tls.verify Off + HTTP_User {{ .Values.elasticsearch.defUsername }} + HTTP_Passwd {{ .Values.elasticsearch.esPassword }} + parsers.conf: | + [PARSER] + Name docker + Format json + Time_Key timestamp + Time_Format %Y-%m-%dT%H:%M:%S.%LZ + Time_Keep On +--- +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: fluent-bit + labels: + k8s-app: fluent-bit-logging + version: v1 + kubernetes.io/cluster-service: "true" +spec: + selector: + matchLabels: + k8s-app: fluent-bit-logging + template: + metadata: + labels: + k8s-app: fluent-bit-logging + version: v1 + kubernetes.io/cluster-service: "true" + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "2020" + prometheus.io/path: /api/v1/metrics/prometheus + spec: + containers: + - name: fluent-bit + image: fluent/fluent-bit:1.5 + imagePullPolicy: Always + ports: + - containerPort: 2020 + env: + - name: ELASTICSEARCH_HOST + value: {{ .Values.elasticsearch.clusterDomain }} + - name: ELASTICSEARCH_PORT + value: "{{.Values.elasticsearch.port}}" + - name: ELASTICSEARCH_USERNAME + value: {{ .Values.elasticsearch.defUsername }} + - name: ELASTICSEARCH_PASSWORD + value: {{ .Values.elasticsearch.esPassword }} + volumeMounts: + - name: fluent-bit-data + mountPath: /mnt/data + subPath: es.json + - name: fluent-bit-config + mountPath: /fluent-bit/etc/ + terminationGracePeriodSeconds: 10 + volumes: + - name: fluent-bit-data + persistentVolumeClaim: + claimName: {{ .Values.volume.pvcName }} + - name: fluent-bit-config + configMap: + name: fluent-bit-config + serviceAccountName: fluent-bit + tolerations: + - key: node-role.kubernetes.io/master + operator: Exists + effect: NoSchedule + - operator: "Exists" + effect: "NoExecute" + - operator: "Exists" + effect: "NoSchedule" +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: fluent-bit-read +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: fluent-bit-read +subjects: + - kind: ServiceAccount + name: fluent-bit + namespace: default diff --git a/appbaseio/templates/ingress-nginx.yaml b/appbaseio/templates/ingress-nginx.yaml new file mode 100644 index 00000000..1b3f4162 --- /dev/null +++ b/appbaseio/templates/ingress-nginx.yaml @@ -0,0 +1,239 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: ingress-nginx +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: nginx-service-account +subjects: + - kind: ServiceAccount + name: default + namespace: ingress-nginx +roleRef: + kind: ClusterRole + name: cluster-admin + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + deployment.kubernetes.io/revision: "1" + generation: 1 + labels: + app: default-http-backend + name: default-http-backend + namespace: ingress-nginx +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: default-http-backend + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + creationTimestamp: null + labels: + app: default-http-backend + spec: + containers: + - image: gcr.io/google_containers/defaultbackend:1.4 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: default-http-backend + ports: + - containerPort: 8080 + protocol: TCP + resources: + limits: + cpu: 10m + memory: 20Mi + requests: + cpu: 10m + memory: 20Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: default-http-backend + name: default-http-backend + namespace: ingress-nginx +spec: + ports: + - port: 80 + protocol: TCP + targetPort: 8080 + selector: + app: default-http-backend + sessionAffinity: None + type: ClusterIP +status: + loadBalancer: {} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + deployment.kubernetes.io/revision: "1" + generation: 1 + name: nginx-ingress-controller + namespace: ingress-nginx +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: ingress-nginx + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + annotations: + prometheus.io/port: "10254" + prometheus.io/scrape: "true" + creationTimestamp: null + labels: + app: ingress-nginx + spec: + containers: + - args: + - /nginx-ingress-controller + - --default-backend-service=$(POD_NAMESPACE)/default-http-backend + - --configmap=$(POD_NAMESPACE)/nginx-configuration + - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services + - --udp-services-configmap=$(POD_NAMESPACE)/udp-services + - --annotations-prefix=nginx.ingress.kubernetes.io + - --publish-service=$(POD_NAMESPACE)/ingress-nginx + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.13.0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + name: nginx-ingress-controller + ports: + - containerPort: 80 + name: http + protocol: TCP + - containerPort: 443 + name: https + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + annotations: + kubernetes.io/ingress.class: nginx + kubernetes.io/tls-acme: "false" + nginx.ingress.kubernetes.io/configuration-snippet: | + add_header 'access-control-expose-headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Search-Id' always; + nginx.ingress.kubernetes.io/cors-allow-credentials: "false" + nginx.ingress.kubernetes.io/cors-allow-headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,X-Search-Id,X-Search-Click,X-Search-ClickPosition,X-Search-Suggestions-Click,X-Search-Suggestions-ClickPosition,X-Search-Conversion,X-Search-Query,X-Search-Filters,X-Request-Tag,X-Query-Tag,X-Search-State,X-Search-CustomEvent,X-User-Id + nginx.ingress.kubernetes.io/cors-allow-methods: + GET, PUT, POST, DELETE, PATCH, + OPTIONS, HEAD + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/proxy-body-size: 100m + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/ssl-redirect: "false" + generation: 2 + name: arc-ingress + namespace: default +spec: + rules: + - http: + paths: + - backend: + serviceName: {{ .Values.arc.name }} + servicePort: {{ .Values.arc.port }} + path: / + # host: es.mydomain.com + + tls: + #- hosts: + # - es.mydomain.com + - secretName: {{ .Values.cert.name }} +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: ingress-nginx + name: ingress-nginx + namespace: ingress-nginx +spec: + externalTrafficPolicy: Local + ports: + - name: http + nodePort: 30372 + port: 80 + protocol: TCP + targetPort: http + - name: https + nodePort: 31473 + port: 443 + protocol: TCP + targetPort: https + selector: + app: ingress-nginx + sessionAffinity: None + type: LoadBalancer \ No newline at end of file diff --git a/appbaseio/templates/tests/test-connection.yaml b/appbaseio/templates/tests/test-connection.yaml new file mode 100644 index 00000000..d4c2668e --- /dev/null +++ b/appbaseio/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "appbaseio.fullname" . }}-test-connection" + labels: + {{- include "appbaseio.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['ping'] + args: ['{{.Values.arc.name }} -c1'] + restartPolicy: Never diff --git a/appbaseio/templates/volumes.yaml b/appbaseio/templates/volumes.yaml new file mode 100644 index 00000000..3e7488e8 --- /dev/null +++ b/appbaseio/templates/volumes.yaml @@ -0,0 +1,38 @@ +{{ if empty .Values.volume.name }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv + labels: + type: local +spec: + storageClassName: standard + capacity: + storage: 5Gi + accessModes: + - ReadWriteMany + hostPath: + path: "/" + +{{ end }} + + +{{ if eq .Values.volume.custom "true" }} + +{{ .Values.volume.customSetting }} + +{{ end }} + + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Values.volume.pvcName | default "pvc" }} +spec: + accessModes: + - {{ .Values.volume.accessModes}} + storageClassName: {{ .Values.volume.storageClassName}} + resources: + requests: + storage: {{ .Values.volume.storageSize}} \ No newline at end of file diff --git a/appbaseio/values.yaml b/appbaseio/values.yaml new file mode 100644 index 00000000..a66e1331 --- /dev/null +++ b/appbaseio/values.yaml @@ -0,0 +1,75 @@ +# ElasticSearch Configuration + # change defUsername if you have another usename defined for you elasticsearch + # change clusterDomain if you have another domain for your elasticsearch or change it if your elasticsearch kubernetes service name is different +elasticsearch: + name: "es" + # This is default port of Elasticsearch, if you've changed the port can change it here + # Or if your Elasticsearch domain doesn't have a port, just replace it with "" -> port: "" + port: 9200 + #ES_Username + defUsername: "elastic" + #ES_Password + esPassword: "" + # Elasticsearch Domain + clusterDomain: "es-es-http" +# arc configuraion +arc: + name: "arc" + nodes: 1 + image: "appbaseio/arc" + tag: "" + serviceType: ClusterIP + nodePort: "" + port: 8000 + storage: 1Gi + +# Appbase.io configuration / get id from "https://arc-dashboard.appbase.io/install" +appbase: + #APPBASE_ID + id: "5626a0bb-fd05-4863-9457-46326033a708." + #APPBASE_USERNAME + username: "admin" + #APPBASE_PASSWORD + password: "admin" + domain: "" + +# Volume configuration +# If you want it to create a Volume for you, leave name empty +# but if you want to use your Persistent volume, enter it's name +volume: + name: "" + storageClassName: "standard" + accessModes: "ReadWriteMany" + storageSize: 1Gi + # pvcName is the name of "Persistent Volume Claim" which we use to assign it to a "Persistent Volume" + pvcName: "pvc" + # custume: "true" you can customize your volume setting, what ever you wrtie in custome setting, will be replaced + custom: "false" + # customeSetting should be edited the same way / Note: Follow indent order + customSetting: | + apiVersion: v1 + kind: Pod + metadata: + name: test-ebs + spec: + containers: + - image: k8s.gcr.io/test-webserver + name: test-container + volumeMounts: + - mountPath: /test-ebs + name: test-volume + volumes: + - name: test-volume + # This AWS EBS volume must already exist. + awsElasticBlockStore: + volumeID: '' + fsType: ext4 + +# you can add your certificate here by configuring below values +# tlsCrt is your tls.crt / tlsKey is tls.key / caCrt is ca.crt +# name is the name of secret file containing your certificate information, if you have your own secret file, you can only fill the name value and leave the other empty +cert: + name: "ssl" + tlsCrt: "" + tlsKey: "" + caCrt: "" \ No newline at end of file From 18b810ee05b11634684e1f94becd4b6b452ae081 Mon Sep 17 00:00:00 2001 From: Maziar Date: Tue, 15 Jun 2021 22:43:05 +0430 Subject: [PATCH 2/2] changes on load balancer - complete readme, some variables and... --- README.md | 81 +++++++++++++++++- appbaseio/.values.yaml.swp | Bin 0 -> 12288 bytes appbaseio/templates/NOTES.txt | 21 ++--- appbaseio/templates/appbaseio.yaml | 11 +-- appbaseio/templates/fluentbit.yaml | 34 +++++--- appbaseio/templates/ingress-nginx.yaml | 40 +++++++-- appbaseio/templates/node-port.yaml | 17 ++++ .../templates/tests/test-connection.yaml | 4 +- appbaseio/values.yaml | 37 +++----- 9 files changed, 171 insertions(+), 74 deletions(-) create mode 100644 appbaseio/.values.yaml.swp create mode 100644 appbaseio/templates/node-port.yaml diff --git a/README.md b/README.md index ddb52aa5..6909951e 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,86 @@ You should have your **Kubernetes** cluster installed and configured and then yo As Arc is an API gateway for your Elasticsearch, make sure that you already have an Elasticsearch cluster with it's basic credentials. -If you don't have an Elasticsearch cluster, you can use this [guid]("https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html") +If you don't have an Elasticsearch cluster, you can use this [guide]("https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html") -## Quick start +## Why Helm Charts: + +Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application. + +Charts are easy to create, version, share, and publish — so start using Helm and stop the copy-and-paste. + +Here we get benefit of Helm Charts to package Arc (which is an API Gateway that sits between a client and an ElasticSearch cluster) and install it in seconds. + +## How to install Appbaseio Helm Chart + +1- run `helm repo add appbase` + +2- run `helm install appbase --set ` + +Make sure that you set below variables which are mandatory: + +- `elasticsearch.clusterURL` + +- `appbase.id` + +- `appbase.username` :if you don't set this variable, by default will be set as "admin" +- `appbase.password` :if you don't set this variable, by default will be set as "admin" + + +## Configure the cluster with Values + +According to Helm chart [values]("https://helm.sh/docs/chart_template_guide/values_files/") you can customize the cluster in the way you want by set variables during the install. +We categorized variables in order to ease it's readability, for example `elasticsearch.clusterURL` means clusterURL is a subset of elasticsearch but while setting a vaiable we should follo it's indentation. +Here are the variables you can set for your cluster: +| Name |Default Value | Kind | Description | +|---|---|---|---| +| elasticsearch.clusterURL | "" | String | clusterURL based on basic authentication. fluent-bit splites this clusterURL soit should be in following pattern: "http://:@domain:port" ( Prtotocol Can also be -> https) | +| arc.name | arc | String | It's the name of Arc service which you can use to access your application via service name | +| arc.image | appbaseio/arc | String | This is the image Appbase.io provides as gateway for your elasticsearch, if you have your local repository, you can push Arc image into that then change the URL here. | +| arc.port | 8000 | Integer | The port that used for Arc service | +| appbase.id | "" | String | This is **APPBASE_ID** that you can get from [Appbase.io]("https://arc-dashboard.appbase.io/install") | +| appbase.username | admin | String | This is the username you choose for your Appbaseio | +| appbase.password | admin | String | This is the password you choose for your Appbaseio | +| appbase.domain | "" | String | If you are installing helm chart on your production and want to assigne a domain to it, set this variable to your domain, make sure that your loadBalancer.serviceType to be empty ("") | +| volume.name | pv | String | If you want to use default volume, leave name empty but if you want to use your Persistent volume, enter it's name, the PVC ( persistent volume claim) will be assigned to it | +| volume.storageClassName | standard | String | Your Storage class which should be the same with PVC, if you have a specific class for your Volume, set that here to also be set for PVC | +| volume.accessModes | ReadWriteMany | String | Access mode for volume | +| volume.storageSize | 1Gi | String | This is the size of PVC storage, Default volume size is 5Gi which you can handle how much of it be assigned to PVC | +| volume.pvcName | pvc | String | You can change PVC (Persitent Volume Claim) name here, it's assigned to PV(Persistent Volume) | +| cert.name | ssl | String | you can add your certificate here by configuring below values. name is the name of secret file containing your certificate information, if you have your own secret file, you can only fill the name value and leave the other empty | +| cert.tlsCrt | "" | String | "tlsCrt" is your "tls.crt" | +| cert.tlsKey | "" | String | "tlsKey" is "tls.key" | +| cert.caCrt | "" | String | "caCrt" is "ca.crt" | +| loadBalancer.serviceType | "" | String |If yo're using kubernetes locally and as you won't have external IP, Can be "NodePort" but if it's your production kubernetes, you can leave it empty which means serviceType is : "LoadBalancer"| + +**Tips:** + +- Some variables might be long to use in install command, so you can export it and then use it e.g. + + `export $(ES_ClusterURL=)` + + then you can use it while installing helm: + + `helm install appbase --set elasticsearch.clusterURL=ES_ClusterURL` + +## Kubernetes Distribution support: +You can check [this page]("https://helm.sh/docs/topics/kubernetes_distros/") to see what distros Helm is currently supporting +## Test on Minikube + +1- Make sure your Minikube is installed, if not, use [this]("https://minikube.sigs.k8s.io/docs/start/") and if you don't have kubectl installed, use this [link]("https://kubernetes.io/docs/tasks/tools/") + +2- Add Appbase helm repo and install it as it's said + + Make sure that you set loadBalancer.serviceType=NodePort + +3- After you install helm chart setting loadBalancer.serviceType=NodePort, you will see this result: +![image](https://user-images.githubusercontent.com/30385958/122102140-5bdb9e80-ce2a-11eb-960b-921c64a298e5.png) + +Which you can use the command to get access to your Appbaseio service + + If you changr arc.name, the command will be: minikube service --url -nodeport + +## How to use it by cloning the project 1- Clone this repositoy: `git clone git@github.com:appbaseio/helm-charts.git` diff --git a/appbaseio/.values.yaml.swp b/appbaseio/.values.yaml.swp new file mode 100644 index 0000000000000000000000000000000000000000..dc5f3b7d0ea883bfc24a02758e567e0ec8050e55 GIT binary patch literal 12288 zcmeHNO>7)B6n2qXpwI&40KL6#gvw7gyJ^xiEK$__fdWm5vP~*+0q=}=*JNhA8hf+d z3c-yN7mk&`FY86+i~;Ht=hd@7*={J->&dZr@^(T zv{a=nlC&JPd2aNeS*pqoPr5=+^m&@xeEQHE6bK63k^%?V)UnB`H61G*q5BVQ-qNUG z6ch*w1O;)L`%K^r&0AB;20UrZz0dE3z;AvnEI0*c9H)B5nmw-=!_keeS3&3;0VcP zcoC=r8^9sp^6j|)06YXd0PF|;fG$4+SAlPU%fRP=)$4sAe1ZZ&fuKN8;9paKNQ-<& zM&eArBWhGCu|)BBktaNhL|(()7CPOM**Q8j(o9P#Yswa5L=j)gjT=W~68((m@4oEz zWIVObwN6S5ZcPntZ5v5VrY(x^stGPpE(|qgA}CUs;WCq1i~6dYlN~3UGU5iqvZl&Y zZlub_Nj9wkwfT-HELATX^)&9fBc74UlD>7G>`v+~#u3kAN`!S_*(m(TNu(Xq2Tw$W zKrB;71FsVi-YY&_7XsS0MIUWW4%-xQYlY#Knw^`+ap7Pz4$LE{(YLWe&u(smZHPqm zsJO6a6&`$=x>zD{&P87(F%+O8Xwi`uYv zjLx*dcHwNDRu=2z9i&}th$p$=ai7FFsm+8RQFcpJBO|ma7uLR~c+tDA=^ssr%9N^Z zX4biB*Qny0iH07sDtxV3lM#nS5;Ip<{ek|Up;sALrBHWI+X*tIF#%JXh4E_+&;#(b;rv)Lit zBu4I#h^2vdo5$MjupYO0d0H8$^Q0pIO0mccsXTVN6cb>3HhH2&Y3Lqlg+`NiMQNDD z12TT6dGfl5d7OG}Zb(3GH=u_NYxnAaEHIbiXuiB?sXaz8do}P zb%|AqB8wO;?+(JjePSeeiN~qTY}?qv`ugHRedYP}g?jz$vm4831M}R+c%$8BeP!eH z!rBV#r1f-s=GY9cHX7w-Ts>Z%o}HO0KR$i@M0t8<>ex(mYKotz&Q4r2)9Nzw7n-ed z3&q`LZ0TW{bnKDUEu0lHre>~EDz%O2=vt-1^Qati-EJtX#)Nld3xdqBMhQ+JF!M`3 zSniIphuCbjT1B7X*u722@iQy(}K%IJ946M7)b~k>Q9K2;0PM@ywJPmSHDB;@e}|)}mn)gejOP z4i+sCaT_%fbF_KZ!r5KeExY6zau%oUs4JAFfhRC1w$1e>+ua5f z5|*0(4aO~ntrf9sHgT|KW`t2Jnwvgr|CSE~b{htEGJ`gr*tNW{w*D-wyO90wLEXI2 Gjr|3Wlv|Ae literal 0 HcmV?d00001 diff --git a/appbaseio/templates/NOTES.txt b/appbaseio/templates/NOTES.txt index c423d723..46000b5a 100644 --- a/appbaseio/templates/NOTES.txt +++ b/appbaseio/templates/NOTES.txt @@ -1,17 +1,6 @@ -1. Get the application URL by running these commands: +{{- if eq .Values.loadBalancer.serviceType "NodePort"}} +Use below command to connect to get appbaseio Access URL: +minikube service --url {{ .Values.arc.name }}-nodeport -{{- if contains "NodePort" .Values.arc.serviceType }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ .Values.arc.name }} }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.arc.serviceType}} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ .Values.arc.name}}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ .Values.arc.name }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.arc.port }} -{{- else if contains "ClusterIP" .Values.arc.serviceType }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ .Values.arc.name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} +** If you're not using minikube, you can set loadBalancer.serviceType to "LoadBalancer" +{{ end }} \ No newline at end of file diff --git a/appbaseio/templates/appbaseio.yaml b/appbaseio/templates/appbaseio.yaml index ef1f6433..98c405f9 100644 --- a/appbaseio/templates/appbaseio.yaml +++ b/appbaseio/templates/appbaseio.yaml @@ -28,11 +28,7 @@ spec: - name: APPBASE_ID value: {{ .Values.appbase.id }} - name: ES_CLUSTER_URL - {{ if .Values.elasticsearch.port}} - value: "http://{{.Values.elasticsearch.defUsername}}:{{.Values.elasticsearch.esPassword}}@{{ .Values.elasticsearch.clusterDomain }}:{{.Values.elasticsearch.port}}/" - {{else if empty .Values.elasticsearch.port}} - value: "http://{{.Values.elasticsearch.defUsername}}:{{.Values.elasticsearch.esPassword}}@{{ .Values.elasticsearch.clusterDomain }}/" - {{end}} + value: {{ .Values.elasticsearch.clusterURL }} - name: LOG_FILE_PATH value: "/mnt/data/es.json" image: {{.Values.arc.image}}:{{.Values.arc.tag | default .Chart.AppVersion}} @@ -60,12 +56,9 @@ metadata: labels: app: {{ .Values.arc.name }} spec: - type: {{ .Values.arc.serviceType }} + type: ClusterIP ports: - port: {{ .Values.arc.port }} targetPort: {{ .Values.arc.port }} - {{ if .Values.arc.nodePort }} - nodePort: {{ .Values.arc.nodePort | default 30007 }} - {{ end }} selector: app: {{ .Values.arc.name }} \ No newline at end of file diff --git a/appbaseio/templates/fluentbit.yaml b/appbaseio/templates/fluentbit.yaml index 254ced2a..8e8481b5 100644 --- a/appbaseio/templates/fluentbit.yaml +++ b/appbaseio/templates/fluentbit.yaml @@ -3,7 +3,7 @@ kind: ServiceAccount metadata: name: fluent-bit --- -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: fluent-bit-read @@ -13,7 +13,18 @@ rules: - namespaces - pods verbs: ["get", "list", "watch"] + +{{ $a := split "//" .Values.elasticsearch.clusterURL}} +{{ $b := split ":" $a._1 }} +{{ $user := $b._0 }} +{{ $c := split "@" $b._1}} +{{ $pass := $c._0}} +{{ $domain := $c._1 }} +{{ $port := "" }} +{{ $port = $b._2 }} + --- + apiVersion: v1 kind: ConfigMap metadata: @@ -47,15 +58,15 @@ data: [OUTPUT] Name es Match * - Host {{.Values.elasticsearch.clusterDomain}} - Port {{.Values.elasticsearch.port}} + Host "{{ $domain }}" + Port "{{ $port }}" Index .logs Type _doc Generate_ID true tls Off tls.verify Off - HTTP_User {{ .Values.elasticsearch.defUsername }} - HTTP_Passwd {{ .Values.elasticsearch.esPassword }} + HTTP_User "{{ $user }}" + HTTP_Passwd "{{ $pass }}" parsers.conf: | [PARSER] Name docker @@ -63,6 +74,7 @@ data: Time_Key timestamp Time_Format %Y-%m-%dT%H:%M:%S.%LZ Time_Keep On + --- apiVersion: apps/v1 kind: DaemonSet @@ -90,18 +102,18 @@ spec: containers: - name: fluent-bit image: fluent/fluent-bit:1.5 - imagePullPolicy: Always + imagePullPolicy: IfNotPresent ports: - containerPort: 2020 env: - name: ELASTICSEARCH_HOST - value: {{ .Values.elasticsearch.clusterDomain }} + value: "{{ $domain }}" - name: ELASTICSEARCH_PORT - value: "{{.Values.elasticsearch.port}}" + value: "{{ $port }}" - name: ELASTICSEARCH_USERNAME - value: {{ .Values.elasticsearch.defUsername }} + value: "{{ $user }}" - name: ELASTICSEARCH_PASSWORD - value: {{ .Values.elasticsearch.esPassword }} + value: "{{ $pass }}" volumeMounts: - name: fluent-bit-data mountPath: /mnt/data @@ -126,7 +138,7 @@ spec: - operator: "Exists" effect: "NoSchedule" --- -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: fluent-bit-read diff --git a/appbaseio/templates/ingress-nginx.yaml b/appbaseio/templates/ingress-nginx.yaml index 1b3f4162..3d0d9c4a 100644 --- a/appbaseio/templates/ingress-nginx.yaml +++ b/appbaseio/templates/ingress-nginx.yaml @@ -1,9 +1,10 @@ +{{ if empty .Values.loadBalancer.serviceType }} apiVersion: v1 kind: Namespace metadata: name: ingress-nginx --- -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: nginx-service-account @@ -178,7 +179,7 @@ spec: restartPolicy: Always schedulerName: default-scheduler --- -apiVersion: extensions/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: @@ -200,17 +201,36 @@ metadata: namespace: default spec: rules: + {{ if empty .Values.appbase.domain}} - http: paths: - - backend: - serviceName: {{ .Values.arc.name }} - servicePort: {{ .Values.arc.port }} + - pathType: Prefix path: / - # host: es.mydomain.com + backend: + service: + name: {{ .Values.arc.name }} + port: + number: {{ .Values.arc.port }} + {{else if .Values.appbase.domain}} + - host: {{ .Values.appbase.domain }} + http: + paths: + - pathType: Prefix + path: / + backend: + service: + name: {{ .Values.arc.name }} + port: + number: {{ .Values.arc.port }} + + + {{ end }} tls: - #- hosts: - # - es.mydomain.com + {{ if .Values.appbase.domain }} + - hosts: + - {{ .Values.appbase.domain }} + {{ end }} - secretName: {{ .Values.cert.name }} --- apiVersion: v1 @@ -236,4 +256,6 @@ spec: selector: app: ingress-nginx sessionAffinity: None - type: LoadBalancer \ No newline at end of file + type: LoadBalancer + + {{ end }} \ No newline at end of file diff --git a/appbaseio/templates/node-port.yaml b/appbaseio/templates/node-port.yaml new file mode 100644 index 00000000..6a91c624 --- /dev/null +++ b/appbaseio/templates/node-port.yaml @@ -0,0 +1,17 @@ +{{ if eq .Values.loadBalancer.serviceType "NodePort" }} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.arc.name }}-nodeport +spec: + type: NodePort + selector: + app: {{ .Values.arc.name }} + ports: + # By default and for convenience, the `targetPort` is set to the same value as the `port` field. + - port: 80 + targetPort: 8000 + # Optional field + # By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767) + nodePort: 30077 +{{ end }} \ No newline at end of file diff --git a/appbaseio/templates/tests/test-connection.yaml b/appbaseio/templates/tests/test-connection.yaml index d4c2668e..1a679a54 100644 --- a/appbaseio/templates/tests/test-connection.yaml +++ b/appbaseio/templates/tests/test-connection.yaml @@ -8,8 +8,8 @@ metadata: "helm.sh/hook": test spec: containers: - - name: wget - image: busybox + - name: curl + image: curlimages/curl command: ['ping'] args: ['{{.Values.arc.name }} -c1'] restartPolicy: Never diff --git a/appbaseio/values.yaml b/appbaseio/values.yaml index a66e1331..d94ab700 100644 --- a/appbaseio/values.yaml +++ b/appbaseio/values.yaml @@ -2,31 +2,23 @@ # change defUsername if you have another usename defined for you elasticsearch # change clusterDomain if you have another domain for your elasticsearch or change it if your elasticsearch kubernetes service name is different elasticsearch: - name: "es" - # This is default port of Elasticsearch, if you've changed the port can change it here - # Or if your Elasticsearch domain doesn't have a port, just replace it with "" -> port: "" - port: 9200 - #ES_Username - defUsername: "elastic" - #ES_Password - esPassword: "" - # Elasticsearch Domain - clusterDomain: "es-es-http" + # clusterURL based on basic authentication / fluent-bit splites this clusterURL so + # it should be in following pattern: http://:@domain:port ( Prtotocol Can also be -> https) + clusterURL: "" + # arc configuraion arc: name: "arc" nodes: 1 image: "appbaseio/arc" tag: "" - serviceType: ClusterIP - nodePort: "" port: 8000 storage: 1Gi # Appbase.io configuration / get id from "https://arc-dashboard.appbase.io/install" appbase: #APPBASE_ID - id: "5626a0bb-fd05-4863-9457-46326033a708." + id: "" #APPBASE_USERNAME username: "admin" #APPBASE_PASSWORD @@ -46,18 +38,8 @@ volume: # custume: "true" you can customize your volume setting, what ever you wrtie in custome setting, will be replaced custom: "false" # customeSetting should be edited the same way / Note: Follow indent order + # in the following we used an AWS volume for test to show how this customizing works customSetting: | - apiVersion: v1 - kind: Pod - metadata: - name: test-ebs - spec: - containers: - - image: k8s.gcr.io/test-webserver - name: test-container - volumeMounts: - - mountPath: /test-ebs - name: test-volume volumes: - name: test-volume # This AWS EBS volume must already exist. @@ -72,4 +54,9 @@ cert: name: "ssl" tlsCrt: "" tlsKey: "" - caCrt: "" \ No newline at end of file + caCrt: "" + +# Nginx LoadBalancer Config + +loadBalancer: + serviceType: "" \ No newline at end of file