Skip to content

Instantly share code, notes, and snippets.

@alexellis
Last active October 18, 2019 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexellis/8c44ef77d77b5b63d76165b6436d5559 to your computer and use it in GitHub Desktop.
Save alexellis/8c44ef77d77b5b63d76165b6436d5559 to your computer and use it in GitHub Desktop.
Inlets Kubernetes exit-nodes
  • Clone the gist
  • Edit the domain and replace exit1.k3d.myfaas.club with your own.
  • kubectl apply -f ingress.yaml,deployment.yaml,service.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
prometheus.io.scrape: "false"
generation: 1
labels:
faas_function: alexellis-inlets
name: alexellis-inlets
namespace: openfaas-fn
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
faas_function: alexellis-inlets
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
com.openfaas.cloud.git-repo-url: https://github.com/alexellis/ofc-k3d
prometheus.io.scrape: "false"
creationTimestamp: null
labels:
app: alexellis-inlets
name: alexellis-inlets
spec:
containers:
- args:
- server
- --port=8080
- --token=test
- --print-token=true
image: docker.io/alexellis2/alexellis-ofc-k3d-inlets-fn:latest-master-7704a0e
imagePullPolicy: Always
name: alexellis-inlets
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 100m
securityContext:
readOnlyRootFilesystem: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /tmp
name: temp
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- emptyDir: {}
name: temp
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
creationTimestamp: null
generation: 1
labels:
app: alexellis-inlets
name: alexellis-inlets
namespace: openfaas-fn
spec:
rules:
- host: exit1.k3d.myfaas.club
http:
paths:
- backend:
serviceName: alexellis-inlets
servicePort: 8080
path: /
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io.scrape: "false"
name: alexellis-inlets
namespace: openfaas-fn
spec:
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
selector:
faas_function: alexellis-inlets
sessionAffinity: None
type: ClusterIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment