Private and public k8s setup

I’m not sure what to search for. I have started working with k8s both at work and at home. I would like to set up the following, but aren’t sure if I can do it in one cluster.

I would like to have k8s managing:

  • Public facing:
    • two static websites (running on one container - I have this working already)
    • two WordPress websites (similar to the above - doesn’t sound too hectic)
  • Private (behind VPN):
    • NextCloud running with encrypted Space which can only be accessed by connecting to a VPN

I would appreciate anyone’s thoughts as to the architecture involved on DO please? Whether this can be done with one cluster, maybe some docs/tutorials pointing a n00b in the right direction?

Thanks :)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
April 13, 2023
Accepted Answer

Hi there,

I believe that this should be achivable. Here are some of the steps that you would need to take:

  1. Kubernetes Cluster: Set up a Kubernetes cluster on DigitalOcean. You can follow the official guide to create and configure your cluster.

  2. Ingress Controller: Deploy an Ingress Controller to manage traffic to your cluster. You can use the following 1-Click installation from the Marketplace: NGINX Ingress Controller

  3. Public-facing Services: Deploy your static websites and WordPress sites using Kubernetes Deployments and Services. You can alternatively use the 1-Click installation for WordPress on Kubernetes from the Marketplace here: WordPress Kubernetes

  4. NextCloud: Deploy NextCloud using Kubernetes Deployment and Service. There are official NextCloud images available that you can use.

  5. Network Policies: Configure Kubernetes Network Policies to restrict access to your private NextCloud instance so that it can only be accessed through the VPN. For this, I could suggest using Cilium for example, Cilium is open source software for transparently securing the network connectivity between application services deployed using Linux container management platforms like Docker and Kubernetes.

How DigitalOcean Manages, Monitors, and Secures Kubernetes for App Platform

If you prefer not to go down the Cilium route, an alternative option is to host your NextCloud instance on a Droplet where you could easily apply a Firewall so that it is locked down for the world and you can host only your WordPress website on the 1-Click installation for WordPress Kubernetes cluster.

Hope that this helps!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel