Skip to content

Instantly share code, notes, and snippets.

@kordless
Last active September 13, 2022 06:28
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save kordless/5625ae8abf3d3f14dd3f9c9d500c7b86 to your computer and use it in GitHub Desktop.
Save kordless/5625ae8abf3d3f14dd3f9c9d500c7b86 to your computer and use it in GitHub Desktop.
Deploy IPFS on Kubernetes

Install it using the Google Cloud shell:

$ kubectl create -f ipfs.yml

That will get you a service running, with an internal IP. I'm using Kong to handle the ingress portion of this, so if you need help, give me a shout. I'm @kordless on Twitter.

apiVersion: v1
kind: Service
metadata:
name: ipfs
spec:
type: NodePort
ports:
- name: ipfs
port: 8080
targetPort: 8080
protocol: TCP
selector:
app: ipfs
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ipfs
labels:
name: ipfs
spec:
replicas: 2
template:
metadata:
labels:
run: ipfs
app: ipfs
spec:
containers:
- name: ipfs
image: "ipfs/go-ipfs:master"
command: ["/usr/local/bin/start_ipfs"]
ports:
- containerPort: 4001
name: "swarm"
protocol: "TCP"
- containerPort: 5001
name: "api"
protocol: "TCP"
- containerPort: 8080
name: "gateway"
protocol: "TCP"
@cbluth
Copy link

cbluth commented Sep 29, 2017

May I add your api.wisdom.sh to this list?:
https://ipfs.github.io/public-gateway-checker/

@kordless
Copy link
Author

You bet!

@kordless
Copy link
Author

I guess I need to figure out my node ID. Hold tight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment