-1

How can I get an install of KubeApps running on K3s? What are the minimal required steps?

1
  • What details or clarity is needed here, it's a self answered question? Commented Jun 16, 2022 at 15:29

1 Answer 1

1

Installing k3s and kubeapps

  1. Install k3s, (official instructions)

    curl -sfL https://get.k3s.io | sh - 
  2. Add KUBECONFIG for user. (Devops.StackExchange)

    export KUBECONFIG=~/.kube/config mkdir ~/.kube 2> /dev/null sudo k3s kubectl config view --raw > "$KUBECONFIG" chmod 600 "$KUBECONFIG" 
  3. Install Helm, (offical instructions)

    curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash 
  4. Setup Kubeapps, (official instructions)

    1. Install Kubeapps

      helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update helm install -n kubeapps --create-namespace kubeapps bitnami/kubeapps 
    2. Configure Kubeapps

      kubectl create --namespace default serviceaccount kubeapps-operator kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator cat <<EOF | kubectl apply -f - apiVersion: v1 kind: Secret metadata: name: kubeapps-operator-token namespace: default annotations: kubernetes.io/service-account.name: kubeapps-operator type: kubernetes.io/service-account-token EOF kubectl get --namespace default secret kubeapps-operator-token -o jsonpath='{.data.token}' -o go-template='{{.data.token | base64decode}}' && echo 
    3. Play (note we have a slight modification with --address 0.0.0.0)

      kubectl port-forward -n kubeapps --address 0.0.0.0 svc/kubeapps 8080:80 

Removal

sudo k3s-uninstall.sh # Remove helm, and caches sudo rm -rf /usr/local/bin/helm ~/.cache/helm /root/.cache/helm # Remove logs sudo rm -rf /var/log/pods/ # Your own cluster config/keys/kubeconfig sudo rm -rf ~/.kube 
1
  • Also add this line to the install instructions echo "export KUBECONFIG=~/.kube/config" >> ~/.bashrc to automate KUBECONFIG finding in each login. Commented Oct 6, 2024 at 8:23

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.