Installing Magalix agent is the only prerequisite to connect a Kubernetes cluster to Magalix backend. The Agent installs like any other pod via a YAML file.
Creating the YAML can be initiated through the "Connect Cluster" wizard, by clicking the "Start" button on the homepage.
Top bar Connect Cluster button
The wizard will guide you through the process, follow the workflow and hit "Finish" when you are done.
At this point, the cluster has been defined at Magalix BE and waiting for a connection with the Agent to start communication.
To finish the process, the YAML needs to be applied to your cluster, you can achieve that in one of two ways. Using the automatically generated URL or manually downloading and applying the YAML to your cluster.
If your Cluster is RBAC enabled, you must have admin access to install the Magalix Agent
To gain admin rights you'll need to execute the following command.
kubectl create clusterrolebinding username-cluster-admin-binding --clusterrole=cluster-admin --firstname.lastname@example.org
The username can be case sensitive in some IAM systems, GCP for example. Make sure you are using the right case when you create the ClusterRoleBinding, otherwise the user won't be authorized to deploy the Agent.
In the middle of the page of the define cluster wizard, you'll see a URL and a copy icon to the left. To install the Agent, copy the command and paste it in your terminal. If successful, you'll see output similar to the one below.
$ kubectl apply -f https://dev1.console.magalix.com/cluster-deployment/6aa6689b-252b-4df0-bf1e-46c1436cf551/2018-09-10T19:58:06Z/5d7e8540597bacf2e26d76dcd1bce1b679cf36676112218d134f8dd2da60a6e4/deployment.yaml
The review page of "Connect Cluster" wizard provides a "Download" button which you can use to locally save the YAML of the Magalix Agent. To download the YAML, expand the panel and click the blue download button on the left. You can also download the YAML from the cluster dashboard showing after you hit finish.
To install the Agent type the following command in your terminal.
$ Kubectl apply -f <LocalPath>\fileName.yaml
Delete Cluster Definition
If you no longer need to connect the cluster, you can select "Delete Cluster Definition", it will remove the cluster definition.
To validate if the Magalix Agent pod has been successfully installed, use the following command. You should see something like magalix-agent-865b6d9ffb-n4v9w in the listed pods
$ kubectl get pods --namespace kube-system NAME READY STATUS RESTARTS AGE event-exporter-v0.1.8-599c8775b7-fprtf 2/2 Running 0 1d fluentd-gcp-v2.0.9-vhg24 2/2 Running 0 1d heapster-v1.4.3-d74857f95-8tz25 3/3 Running 0 1d kube-dns-778977457c-6vkdf 3/3 Running 0 1d kube-dns-autoscaler-7db47cb9b7-w4q49 1/1 Running 0 1d kube-proxy-gke-sandbox-default-pool-a57643f1-s22p 1/1 Running 0 1d kubernetes-dashboard-6bb875b5bc-8jzxn 1/1 Running 0 1d l7-default-backend-6497bcdb4d-4z8g5 1/1 Running 0 1d magalix-agent-865b6d9ffb-n4v9w 1/1 Running 1 1d tiller-deploy-dccdb6fd9-r4b4f 1/1 Running 0 1d
Now that you connected your cluster, explore what you can do with Magalix Console
|Exploring Magalix Console|