kubernetes kubernetes/extras kubernetes/networking

Core Idea

Portainer installs into any cluster with one Helm release that forces TLS and persistent storage, and its web URL is just a node address plus the service nodePort.

  • helm upgrade --install --create-namespace -n portainer pins the image tag and sets tls.force=true with a storage class.
  • Get URL: read the service’s nodePort and a node’s address, then open https://$NODE_IP:$NODE_PORT.
  • Everything lives in its own portainer namespace.
helm upgrade --install --create-namespace -n portainer portainer portainer/portainer \
    --set tls.force=true \
    --set image.tag=2.21.4 \
--set persistence.storageClass=standard

Get URL

export NODE_PORT=$(kubectl get --namespace portainer -o jsonpath="{.spec.ports[0].nodePort}" services portainer)
 
export NODE_IP=$(kubectl get nodes --namespace portainer -o jsonpath="{.items[0].status.addresses[0].address}")
 
echo https://$NODE_IP:$NODE_PORT