sommerfeld-io-archive / configs

Configuration as code for all my computers and RasPi nodes.
Other
1 stars 0 forks source link

Replace Portainer Setup with Minikube #142

Open sebastian-sommerfeld-io opened 4 months ago

sebastian-sommerfeld-io commented 4 months ago

Issue

Todo

Additional Todos

Follow Up Todo

Follow Up Poc

sebastian-sommerfeld-io commented 4 months ago

Comparison of Minikube and Minishift

Minikube and Minishift are both tools designed to simplify the process of running container orchestration platforms locally for development and testing purposes. While they share some similarities, they are tailored for different platforms and use cases.

Similarities

  1. Local Development Environment:

    • Both Minikube and Minishift allow developers to run a single-node cluster locally on their machine for development and testing.
  2. Cross-Platform Support:

    • Both tools support multiple operating systems, including Windows, macOS, and Linux.
  3. Virtualization:

    • They both rely on virtual machines to create the cluster environment. They can use different VM drivers such as VirtualBox, KVM, Hyper-V, etc.
  4. CLI Tools:

    • Minikube and Minishift provide command-line interfaces to manage the lifecycle of the local cluster, including starting, stopping, and configuring the cluster.

Differences

  1. Underlying Platform:

    • Minikube: Primarily used for running a local Kubernetes cluster.
    • Minishift: Designed to run a local OpenShift cluster, which is a Kubernetes distribution with additional enterprise features.
  2. Installation and Setup:

    • Minikube: Requires less initial setup and configuration, making it quicker to get started with a basic Kubernetes cluster.
    • Minishift: Involves setting up additional components specific to OpenShift, which might take more time and configuration.
  3. Resource Requirements:

    • Minikube: Generally lighter in terms of resource usage since it focuses on Kubernetes without the additional overhead of OpenShift features.
    • Minishift: Requires more resources because it includes OpenShift-specific components like the web console, source-to-image builds, and more.
  4. Use Case:

    • Minikube: Ideal for developers who need a straightforward, lightweight Kubernetes environment for testing and development.
    • Minishift: Best for developers and teams who are developing applications specifically for OpenShift or need to test features unique to OpenShift.
  5. Add-ons and Integrations:

    • Minikube: Supports Kubernetes add-ons but does not include OpenShift-specific features like the OpenShift web console, integrated Jenkins, and OpenShift-specific routing.
    • Minishift: Comes with OpenShift-specific add-ons and features out of the box.

Which to Use and When

Interaction with Helm, kubectl, and ArgoCD

Both Minikube and Minishift provide the ability to interact with your clusters using common Kubernetes tools such as Helm, kubectl, and ArgoCD. However, there are some nuances:

  1. Helm:

    • Minikube: Fully supports Helm for managing Kubernetes applications. You can install and manage Helm charts just as you would on any Kubernetes cluster.
    • Minishift: Since OpenShift is Kubernetes-based, you can also use Helm with Minishift. However, some Helm charts may require modifications to work with OpenShift’s security constraints and policies.
  2. kubectl:

    • Minikube: Directly supports kubectl for interacting with the Kubernetes API server.
    • Minishift: While you can use kubectl with OpenShift, it is more common to use the oc CLI, which is a superset of kubectl with additional OpenShift-specific commands and features.
  3. ArgoCD:

    • Minikube: Fully compatible with ArgoCD for GitOps workflows, allowing you to deploy and manage applications via declarative GitOps practices.
    • Minishift: Also supports ArgoCD, but you might need to adjust certain configurations to align with OpenShift’s specific requirements and policies.

Unique CLI Tools

  1. Minikube:

    • minikube CLI: Used to manage the lifecycle of the Minikube cluster. Commands include minikube start, minikube stop, minikube status, etc.
  2. Minishift:

    • minishift CLI: Used to manage the lifecycle of the Minishift cluster. Commands include minishift start, minishift stop, minishift status, etc.
    • oc CLI: The OpenShift command-line interface, which extends kubectl with OpenShift-specific commands and features. Commands include oc new-app, oc status, oc project, etc.

Summary

Using these tools effectively depends on your development environment and the specific requirements of your applications. Minikube offers simplicity for standard Kubernetes applications, while Minishift provides the additional capabilities required for developing and testing OpenShift-specific applications.

Installing Minikube and Minishift on the same machine

You can install both Minikube and Minishift on the same machine at the same time. Since you do not need to run both simultaneously, you can shut down one while powering up the other. This allows you to switch between a local Kubernetes cluster and a local OpenShift cluster as needed.

Steps to Manage Both on the Same Machine

  1. Install Minikube:

    • Follow the installation instructions for Minikube on your operating system.
    • Start Minikube: minikube start
    • Stop Minikube when switching to Minishift: minikube stop
  2. Install Minishift:

    • Follow the installation instructions for Minishift on your operating system.
    • Start Minishift: minishift start
    • Stop Minishift when switching to Minikube: minishift stop

Example Workflow

  1. To use Minikube:

    minishift stop
    minikube start
  2. To use Minishift:

    minikube stop
    minishift start

Considerations

By managing the start and stop of each tool, you can effectively use both Minikube and Minishift on the same machine without conflicts.

sebastian-sommerfeld-io commented 4 months ago

🚫 Minishift is no longer under active development

Minishift is no longer under active development. The project was officially deprecated in favor of CodeReady Containers (CRC), which provides a similar local OpenShift environment but with better performance and support for newer versions of OpenShift.

Key Points

Recommendations

Transition from Minishift to CRC

If you have been using Minishift and need to switch to CRC, here are the basic steps:

  1. Download CRC:

  2. Install CRC:

    • Follow the installation instructions provided on the CRC download page.
  3. Start CRC:

    crc setup
    crc start
  4. Stop CRC:

    crc stop
  5. Usage:

    • CRC provides a crc command-line interface similar to Minishift.

By transitioning to CRC, you will ensure you are using a tool that is actively supported and aligned with the latest OpenShift developments.