@@ -54,98 +54,44 @@ Some useful Helm client commands are:
5454- View available charts: ` helm search repo `
5555- Install a chart: ` helm install <name> localstack/<chart> `
5656- Upgrade your application: ` helm upgrade `
57+ - Uninstall or delete a release: ` helm uninstall <name> `
5758
58- ## LocalStack on Kubernetes ( ` l8k ` )
59+ ## LocalStack Pro
5960
60- The [ ` localstack-on-k8s ` ] ( https://github.com/localstack/localstack-on-k8s ) sample repository illustrates running LocalStack on Kubernetes (k8s).
61+ You can use this chart with LocalStack Pro by:
6162
62- ### Prerequisites
63-
64- This sample requires the following tools installed on your machine:
65-
66- - Python 3.7+
67- - [ ` awslocal ` ] ( https://github.com/localstack/awscli-local )
68- - [ Docker] ( https://www.docker.com )
69- - [ Git] ( https://git-scm.com )
70- - [ Helm] ( https://helm.sh )
71- - [ ` kubectl ` ] ( https://kubernetes.io/docs/tasks/tools/#kubectl )
72- - [ Serverless] ( https://www.npmjs.com/package/serverless )
73-
74- ### Clone the sample repository
63+ 1 . Changing the image to ` localstack/localstack-pro ` .
64+ 2 . Providing your Auth Token as an environment variable.
7565
76- Clone the repository:
77-
78- {{< command >}}
79- $ git@github.com : localstack /localstack-on-k8s.git
80- {{< /command >}}
66+ You can set these values in a YAML file (in this example ` pro-values.yaml ` ):
8167
82- To install the Python dependencies in a virtualenv:
68+ ``` yaml
69+ image :
70+ repository : localstack/localstack-pro
8371
84- {{< command >}}
85- $ make install
86- {{< /command >}}
72+ extraEnvVars :
73+ - name : LOCALSTACK_AUTH_TOKEN
74+ value : " <your auth token>"
75+ ` ` `
8776
88- To create an embedded Kubernetes (k3d) cluster in Docker and install LocalStack in it (via Helm) :
77+ If you have the LocalStack Auth Token in a secret, you can also reference it directly with ` extraEnvVars` :
8978
90- {{< command >}}
91- $ make init
92- {{< /command >}}
79+ ` ` ` yaml
80+ extraEnvVars:
81+ - name: LOCALSTACK_AUTH_TOKEN
82+ valueFrom:
83+ secretKeyRef:
84+ name: <name of the secret>
85+ key: <name of the key in the secret containing the API key>
86+ ` ` `
9387
94- After initialization, your ` kubectl ` command-line should be automatically configured to point to the local cluster context :
88+ And you can use these values when installing the chart in your cluster :
9589
9690{{< command >}}
97- $ kubectl config current-context
98- <disable-copy >
99- k3d-ls-cluster
100- </disable-copy >
91+ $ helm repo add localstack-charts https://localstack.github.io/helm-charts
92+ $ helm install my-release localstack-charts/localstack -f pro-values.yaml
10193{{< /command >}}
10294
103- ### Deploy the sample application
104-
105- Once LocalStack is installed in the Kubernetes cluster, we can deploy the sample app on the LocalStack instance:
106-
107- {{< command >}}
108- $ make deploy
109- {{< /command >}}
110-
111- ### Test the sample application
112-
113- Once the sample app is deployed, the Kubernetes environment should contain the following resources:
114-
115- {{< command >}}
116- $ kubectl get all
117- NAME READY STATUS RESTARTS AGE
118- pod/localstack-6fd5b98f59-zcx2t 1/1 Running 0 5m
119-
120- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
121- service/kubernetes ClusterIP 10.43.0.1 <none > 443/TCP 5m
122- service/localstack NodePort 10.43.100.167 <none > 4566:31566/TCP,4571:31571/TCP 5m
123-
124- NAME READY UP-TO-DATE AVAILABLE AGE
125- deployment.apps/localstack 1/1 1 1 5m
126-
127- NAME DESIRED CURRENT READY AGE
128- replicaset.apps/localstack-6fd5b98f59 1 1 1 5m
129- {{< /command >}}
130-
131- The LocalStack instance should be available via the local ingress port ` 8081 ` .
132- We can verify that the resources were successfully created by running a few ` awslocal ` commands against the local endpoint:
133-
134- {{< command >}}
135- $ awslocal sqs --endpoint-url=http://localhost:8081 list-queues
136- {
137- "QueueUrls": [
138- "http://localhost:8081/000000000000/requestQueue "
139- ]
140- }
141- $ awslocal apigateway --endpoint-url=http://localhost:8081 get-rest-apis
142- {
143- "items": [
144- {
145- "id": "ses2pi5oap",
146- "name": "local-localstack-demo",
147- ...
148- {{< /command >}}
95+ # # Parameters
14996
150- We can then use a browser to open the [ Web UI] ( http://localhost:8081/archive-bucket/index.html ) , which should have been deployed to an S3 bucket inside LocalStack.
151- The Web UI can be used to interact with the sample application, send new requests to the backend, inspect the state of existing requests, etc.
97+ {{< github-markdown repo="localstack/helm-charts" file="charts/localstack/README.md#parameters" lang="markdown" >}}
0 commit comments