https://github.com/felipecruz91/inlets-demo-gcp
Exposes an nginx server running in your private Kubernetes cluster (e.g using Docker Desktop in your local laptop) to Google Cloud Platform using inlets.dev
https://github.com/felipecruz91/inlets-demo-gcp
inletsdev kubernetes
Last synced: about 2 months ago
JSON representation
Exposes an nginx server running in your private Kubernetes cluster (e.g using Docker Desktop in your local laptop) to Google Cloud Platform using inlets.dev
- Host: GitHub
- URL: https://github.com/felipecruz91/inlets-demo-gcp
- Owner: felipecruz91
- Created: 2020-12-12T11:32:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-12T11:47:56.000Z (over 4 years ago)
- Last Synced: 2025-03-20T02:47:30.562Z (2 months ago)
- Topics: inletsdev, kubernetes
- Language: Shell
- Homepage:
- Size: 182 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# inlets-demo-gcp
Exposes an nginx server running in your private Kubernetes cluster (e.g using Docker Desktop in your local laptop) to Google Cloud Platform using [inlets.dev](https://inlets.dev/)
## Getting started
Getting `arkade`:
```cli
curl -sSL https://dl.get-arkade.dev | sudo sh
```On the Kubernetes host install `inlets-pro` and `inletsctl`
```cli
curl -sLSf https://inletsctl.inlets.dev | sudo shsudo inletsctl download --pro
```Configure the required permissions in your Google Cloud project:
```cli
./setup-gcp.sh
```Provision a VM in Google Cloud Platform using `inlestctl`:
```cli
inletsctl create \
--project-id $PROJECTID \
--provider gce \
--access-token-file key.json
```
Install the `inlets-operator` and specify the path for the GCP access token:
```cli
arkade install inlets-operator \
--provider gce \
--project-id $PROJECTID \
--zone us-central1-a \
--token-file key.json \
--license $(cat ./inlets-pro-license.txt)
```Deploy the nginx workload to your private Kubernetes cluster:
```cli
kubectl apply -f \
https://raw.githubusercontent.com/inlets/inlets-operator/master/contrib/nginx-sample-deployment.yaml
```Finally, expose it with a `LoadBalancer` from Google Cloud Platform:
```cli
kubectl expose deployment nginx-1 --port=80 --type=LoadBalancer
```
## Clean up
Remove the VM that was created with `inletsctl`:
```cli
inletsctl delete --provider gce \
--id "|us-central1-a|" \
--access-token-file key.json
```## References:
- https://blog.alexellis.io/get-private-kubectl-access-anywhere/
- https://blog.alexellis.io/ingress-for-your-local-kubernetes-cluster/
- https://docs.inlets.dev/#/tools/inlets-operator?id=create-exit-node-on-google-compute-engine