Kubernetes or Docker Swarm

Discussion in 'Business & Enterprise Computing' started by koss, Jul 4, 2019.

  1. koss

    koss Member

    Joined:
    Mar 6, 2009
    Messages:
    5,090
    Location:
    Vic
    I decided I should learn Kubernetes, so I have been watching a bunch of webinars and tutorials on Youtube over the past week. I set up a docker server running Wordpress to get a handle on those commands, I am about to set up Kubernetes.

    There are a lot of Kubernetes based Linux distros out there, and one thing I noticed was that several of them use Alpine Linux which I read was R/O RAM based distro, and I am looking for advice if I should use one of those or just install Kubernetes on top of Debian or RHEL?
     
  2. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    959
    Location:
    BRISBANE
    koss likes this.
  3. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    7,344
    Location:
    Briz Vegas
    kubernetes.jpg

    PS - also check out
    portainer.io <- better IMO for home users
    rancher.com <- can overlay kubernetes
     
    Last edited: Jul 4, 2019
  4. Daemon

    Daemon Member

    Joined:
    Jun 27, 2001
    Messages:
    5,435
    Location:
    qld.au
  5. OP
    OP
    koss

    koss Member

    Joined:
    Mar 6, 2009
    Messages:
    5,090
    Location:
    Vic
  6. Daemon

    Daemon Member

    Joined:
    Jun 27, 2001
    Messages:
    5,435
    Location:
    qld.au
    Absolutely. You'll never deploy on a Pi / old tin, so learn in the env you'll actually use. minikube is ok if you have a Linux env to start with, WSL2 may also help here once it's not like an 80's PC file access wise
     
  7. OP
    OP
    koss

    koss Member

    Joined:
    Mar 6, 2009
    Messages:
    5,090
    Location:
    Vic
    I posted a thread in the Small form factor and portable forum asking for hardware recommendations and nobody replied, so I spent the weekend trawling eBay and came up with these things.
    https://www.ebay.com.au/itm/Dell-Op...hz-8Gb-Ram-500Gb-HDD-Wifi-Win-10/183533182966 ex government refurbished Dell units.

    A few of those should be better than the Raspberry Pi cluster I built last week, which did work on Rancher k3s and Docker Swarm. Kind of hooked on Docker Swarm atm. I discovered Portainer yesterday, so the Kubernetes will go on the backburner until I get sick of Swarm.

    Going to run up some distributed storage like glusterfs next, is that still the best for geo replication?

    What I am trying to accomplish atm. to learn the practical application/limitations of distributed containers, to do this I am trying to set up a Wordpress site, that is replicated across 3 "data centers", ie: home, work, and I rented some VM space in the Vultr.com data center in Sydney. I figure that should be a good enough test. So far I have the Wordpress site running just under Docker with a single container for WP, Mysql, phpmyadmin, that's all good, so I am preparing for the next phase.
     
    Last edited: Jul 7, 2019
  8. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    7,344
    Location:
    Briz Vegas
    Docker swarm runs on pi cluster what are your issues?

    Building a pi 4 cluster when they arrive for my production CI pipeline.
     
  9. OP
    OP
    koss

    koss Member

    Joined:
    Mar 6, 2009
    Messages:
    5,090
    Location:
    Vic
    My main issue, as Daemon hinted at above, is that a Pi cluster is not a real world test because most data centers won't let you spin up armhf Linux distros, only x86, so the Pi cluster is ok at home, it actually runs quite well, but it won't let me learn the problems with geo replication and typical container deployments that avoid the need for disaster recovery sites. The problem with DR sites is they tend to keep backups of data and apps but don't share the workload, so the end result is expensive hardware, which is mostly idle.

    I am from the VM era, specifically Proxmox KVM boxes, with a dabbling in Xen and ESX.
    Need to catch up on the 21st. century thinking. For the past few years I thought Docker was just something like FreeBSD jails or some other single computer security solution, until recently when a lot of videos on Kubernetes came out. Watched one that explained how much more efficiently containers used RAM, CPU, and especially disk space than the VM solutions I am currently using, then the penny finally dropped.
     
    Last edited: Jul 7, 2019
  10. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    7,344
    Location:
    Briz Vegas
    Yeah... NAH the software you use if you are going to roll your own is identical, sure they aren't as powerful but the reality of most clusters in the "real" world is that each node usually only handles a single job so the principal remains the same. if you are going to spend money and want to learn then I would suggest using either Google or AWS, both have kubernetes as a product and orchestration that will allow you to create and destroy for short periods of time for cents in the dollar, all the on-demand costs are charged at an hourly rate so running an experiment for 1-2 hours then destroy, your orchestration scripts should build everything in seconds the next time you wish to use.

    As for Pi Cluster, don't forget the point of docker is you run the container anywhere, the dev docker container is the production container, so if you want to learn docker orchestration Pi Cluster is a perfectly viable option as the skills directly transfer. IMO Pi Cluster's running swarm will now be a thing in most software development environments now they have 4GB, perfect for dev and test environments.

    * Test Environments - I currently have plains to now use Pi 4 Cluster to run Dev environments for testing on commits to GitHub, and the same tests on stage/uat inside AWS as part of the CI pipeline. The final plan is to use docker swarms to generate load traffic on stage (tempory duplicate of live) before final commit to live. In reality all of it currently gets down in AWS now, but the hardware nerd in me likes to have a rack full of blimky lights in the office makes new customers go "oh.. ARH!". ;)

    No you are correct Docker at a basic comparison JAILs and LXC are very similar and both rely heavily on CGROUPS. Don't be fooled by hipsters there is nothing new in the concept it has been a staple in mainframe land since the 1960s, sure the tooling is much better due to more mass acceptance and many more participants but the concepts aren't new.
    https://www.networkworld.com/articl...ation-behind-it--ibm-looks-to-the-future.html
     
  11. OP
    OP
    koss

    koss Member

    Joined:
    Mar 6, 2009
    Messages:
    5,090
    Location:
    Vic
    I went to install Rancher on the Pi Cluster to manage the containers, and immediately discovered that they don't make a Pi version of it, only runs on x86 even the ARM64 version is tagged as experimental. Hence why I am now playing with Docker Swarm and Portainier, whilst looking for some cheap x86 hardware. Turns out lots of the official and verified docker images have not been ported to the Pi, only the more popular ones.
     
  12. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    959
    Location:
    BRISBANE
    Write your own Dockerfile and build your own images?
     
  13. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    7,344
    Location:
    Briz Vegas
    https://howchoo.com/g/njy4zdm3mwy/how-to-run-a-raspberry-pi-cluster-with-docker-swarm <- get a swarm running
    ^ docker too easy to install
    https://www.portainer.io/installation/ <- be sure to install both portainer and agent to swarm manager node

    Raspbian is based on debian, once kernel and hardware drivers install all software is apt-get install <BLAH> nothing armh specific.

    Hope these pointers help, when you do Wordpress, do webserver/php/wordpress one docker on 1 pi and mysql on a separate pi.
     
    Last edited: Jul 8, 2019
    koss likes this.
  14. OP
    OP
    koss

    koss Member

    Joined:
    Mar 6, 2009
    Messages:
    5,090
    Location:
    Vic
    So I ended up buying 3x Dell OptiPlex 9020m boxes to make up a Debian "Buster" cluster. Watched half a dozen Kubernetes videos, too much information overload, not sure where to start, so I am focusing on Docker Swarm until I have a handle on that, then I will go back to Kubernetes. I did notice that the Indians have cornered the Youtube Kubernetes video market, very strange. It's like the tip of an iceberg, so much stuff in this container space, it's actually the most IT fun I have had in years.

    My test project will be making a HA Wordpress site that load balances I will put 2 nodes in the office and one at home on my NBN connection. I did a single node Wordpress in Docker on an old Acer box that had an Intel Atom D525 and it worked really well, hit a score of 96 on Google Pagespeed which blew me away.

    The best Swarm tutorial I found so far has been this presentation from Dockercon19.
    https://dockercon19.bretfisher.com/#19

    Let me know if you find any good Swarm tutorials, the more I watch the more it sinks in.
     
    Last edited: Jul 16, 2019 at 7:15 AM

Share This Page

Advertisement: