In this post I’m going to show you how you can run ghost, a headless CMS or your own apps in a namespace by defining the proper requests and limits in the deployment manifest file of ghost or your own app on RSaaS.
Click on the project and in the navigation menu bar click on Namespaces and in the top right side click on the blue button “Add Namespace”:
Please provide you user id or any other name as you’d like for the namespace, if a namespace like my-namespace exists, you’ll get a warning notice from the system and you should provide another name. We recommend to provide your user-id as the namespace name. In our next release we’ll create the namespace with your user-id for you.
Now that we have created a namespace, we’re ready to deploy our Ghost app.
First you need to select the cluster and click on the “Launch kubectl” button:
With that we’ll have Shell access to the cluster in our browser:
With the following kubectl command, you can switch to your namespace:
kubectl config set-context --current --namespace <your namespace>
And deploy Ghost like this:
kubectl create -f https://raw.githubusercontent.com/kubernauts/practical-kubernetes-problems/master/3-ghost-deployment.yaml
Please note in the spec part of the manifest we’re setting the limits for CPU and Memory in the resources part of our ghost image, unless you’ll not be able to deploy the app.
- image: ghost:latest
To see if our deployment was successful, we can run:
kubectl get deployment
Now we can create a L7 Ingress to ghost easily in Rancher by selecting Resources → Workloads → Add ingress.
In this example we’re going to tell Rancher to generate a .xip.io hostname for us:
After couple of seconds the L7 ghost ingress is ready to go, click on the ghost-ingress-xyz-xip.io link and enjoy:
If you have any questions, we’d love to welcome you to our Kubernauts Slack channel and be of help.
We love people who love building things, New Things!
If you wish to work on New Things, please do visit our job offerings page.
Deploy Ghost in a Spot Namespace on RSaaS from your browser was originally published in Kubernauts on Medium, where people are continuing the conversation by highlighting and responding to this story.
Mehr zu Kubernetes Services, Kubernetes Training und Rancher dedicated as a Service lesen unter https://blog.kubernauts.io/deploy-ghost-in-a-spot-namespace-on-rsaas-from-your-browser-d9376db342e0?source=rss—-d831ce817894—4