Register minikube
Steps to register minikube Cluster in gopaddle
minikube cluster can be registered in gopaddle either using its public IP address or a fully qualified domain name (FQDN) or securely via a Bastion Host or a Jump server.
1. Port Configuration
In the steps to follow, we will be configuring Nginx server to proxy the requests to the Cluster API server. Make sure port the Nginx server port (default 80) is open to public.
2. Set up Nginx Proxy
Install Python3 and Pip, if not already installed.
Install pyyaml dependency
Make a temporary directory to download the scripts
Download the script to extract and expand the CA Certificate, Client Certificate and Key data in the Kubernetes configuration.
Install kubectl command line tool, if not installed already.
Install yq tool to filter Kubernetes YAML file contents.
Run the replace script to extract and expand the CA Certificate, Client Certificate and Key data in the Kubernetes configuration
Download the script to extract the API server URL, CA Authority, Client certificate and key data from the default Kubernetes Configuration file.
Verify if the extraction script works as expected.
The output of this execution must result in a similar output like this - Eg output. https://127.0.0.1:40773
Note that the ports might differ based on the cluster configuration.
Install Nginx and set HTTP basic authentication for the user named minikube.
Download the scripts to prepare the Nginx configuration and SSL certificate files
Prepare the Nginx configuration and SSL certificate files
Install docker, if not already installed. Check the steps here to install docker.
Run Nginx container with the configuration and SSL certificate files.
Check if Nginx proxy works (skip this step for bastion host setup)
Open a browser session with the public IP address or the FQDN of the cluster master node. Eg. http://<public_ip>
This must show a popup for authentication. Enter the Username as kind and password set in step 6.
Copy the kube.config file to your local desktop environment
3. Validate Connection from Local Desktop Environment
Edit the kube.config and replace the server with the Nginx endpoint with basic authentication like this - http://<httpd_user>:<http_password>@<public-ip_or_fqdn>
Based our Nginx configuration in this example, the protocol must be http and not https
Verify if kube configuration works.
Use this kube.config file to register the cluster in gopaddle.
4. Register the Cluster in gopaddle
In the gopaddle UI, navigate to the Clusters section
Click on Add a Cluster and select Register an existing Cluster
In the Cluster registration wizard, select the Cluster Access Method as Kube Config
Choose the Cluster Provider type as Other
In the Authentication Step, upload the Kubernetes config file gathered under section "Validate Connection from Local Desktop Environment".
If you have configured a bastion host, provide the Bastion Host IP, SSH Pem file, SSH port
If you are using a Bastion Host setup, make sure the Bastion Host IP and Port are accessible publicly. If you are looking for a private only setup, get in touch with us to explore gopaddle Enterprises.
Click on Finish to register the On-premises Cluster.
If you see the error - Network Error ! ServerError: Response not successful: Received status code 503, while view the cluster resources, then check this troubleshooting section for more information.
Last updated