Portainer Web GUI - Environment Connection
With my K8 cluster now set up, I'm going to connect this cluster to my Portainer container running in my local Docker engine on another VM I have in Proxmox. For more details about my Portainer set up, check out my Docker Containers. book. Portainer is a Web GUI container you can use for containerKubernetes and Docker management, and it'll allow me to manage and deploy docker containers and Kubernetes clusters. See below to view how I set up my connection:
Portainer Agent
To connect this cluster, I'll be deploying a Portainer Agent onto the cluster. To do so, run the following command in any node of your cluster:
kubectl apply -f https://downloads.portainer.io/ce2-19/portainer-agent-k8s-nodeport.yaml
With this installed, check the status of the agent by running the following command:
kubectl get pods --namespace=portainer
Now, open up your Portainer GUI in the web browser and navigate to Environment ---> Add. Select Kubernetes and start the wizard:
Next, enter your node IP address and specify port 30778. I'm using NordPort so 30778 applies; if you're using load balancer then use port 9001:
Your cluster should now connect, load, and be added to your dashboard:
Select "Live Connect" to view your cluster resources:
The cluster is now connected to Portainer and can be managed via the Web GUI!