Sign in KubeSail with Your GitHub Account
Here is how the dashboard looks like. There are two Apps hosted under my account:
Create a new Template
Edit Yaml:
I am using one of my APPs , WebSSH docker image, as an example:
Change Image Name (found from hub.docker.com's image repository )Â and default container port number:
apiVersion: apps/v1
kind: Deployment
metadata:
name: new
labels:
app: webssh
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
replicas: 1
selector:
matchLabels:
app: webssh
template:
metadata:
labels:
app: webssh
spec:
containers:
- name: api
image: jakewalker/webssh
imagePullPolicy: Always
ports:
- name: http-ports
containerPort: 8888
Launch APP from Template and Configure Network
After edit YAML , you can launch this app from the template directly. You can check logs or directly connect to it:
Configure Cloudflare WorkersÂ
Create a workers with following script:addEventListener(
"fetch",event => {
let url=new URL(event.request.url);
url.hostname="webssh.51sec.usw1.kubesail.org";
let request=new Request(url,event.request);
event. respondWith(
fetch(request)
)
}
)
DNS A record for webssh. Value can be any valid ip such as 8.8.8.8. Once A record created, a workers route will route webssh.51sec.org url to your workers - webssh, which eventually will be redirected to destination webssh.51sec.usw1.kubesail.org.Â
I tested two docker images: WebSSH and Ghost. Both worked well. Especially Ghost blog , it is running on http://ghost.51sec.org with admin page at http://ghost.51sec.org/ghost.
No comments:
Post a Comment