description = "Running Kubeflow using the GitOps methodology with Argo CD"
weight = 60
+++
This guide describes how to set up Kubeflow using Argo-CD as a GitOps methodology.
## What is GitOps?
GitOps is a Continuous Delivery methodology centered around using Git as a single source of truth for declarative infrastructure and application code. The Git repo defines the desired state of an application using declarative specifications, and a GitOps tool like Argo CD will reconcile the differences between the manifest defined by the git repo and the live system. As a result, GitOps enforces an operating model where all changes are observable and verifiable through git commits. The declarative specifications streamline deployments as developers do not need to write scripts to build and deploy their application. Once the application is deployed, debugging is simplified as developers have a clear set of change logs through their Git commits history. Even if the live system has drifted away from the source repo's desired state, the GitOps methodology provides the tools to converge the real system with the desired state through the declarative specs. Finally, once the breaking commit is found, rollback becomes as simple as syncing a previously good git commit. All these benefits reduce the amount of work developers have to spend on managing deployments to allow them to focus on other features.
## Argo CD and GitOps
[Argo CD](https://argoproj.github.io/argo-cd) is a Kubernetes-native Declarative Continuous Delivery tool that follows the GitOps methodology. Along with all the benefits of using GitOps, Argo CD offers:
* Integrations with templating tools like Ksonnet, Helm, and Kustomize in addition to plain yaml files to define the desired state of an application
* Automated or manual syncing of applications to its desired state
* Intuitive UI to provide observability into the state of applications
* Extensive CLI to integrate Argo CD with any CI system
* Enterprise-ready features like auditability, compliance, security, RBAC, and SSO
## Before you start
This guide assumes you have a Kubernetes cluster. If you don't, follow [this guide](/docs/started/getting-started/#set-up-kubernetes) to create one.
## Install Argo CD
Follow the [argo cd getting started guide](https://github.com/argoproj/argo-cd/blob/master/docs/getting_started.md) up to the '[Create an application from a git repository location](https://github.com/argoproj/argo-cd/blob/master/docs/getting_started.md#6-create-an-application-from-a-git-repository-location)' step.
* For example, if your local machine is OSX and you want to deploy Argo CD and Kubeflow to the same GKE cluster, you could run:
You can read about other options to connect to your Argo CD instance [here](https://github.com/argoproj/argo-cd/blob/master/docs/getting_started.md#3-access-the-argocd-api-server).
1. Log in using the CLI as an admin user.
The initial password for the admin user is autogenerated to be the pod name of the ArgoCD API server. This can be retrieved with the command:
```shell
kubectl get pods -n argocd -lapp=argocd-server -o name | cut-d'/'-f 2
```
Using the above password, login to ArgoCD by running:
```shell
argocd login localhost:8080
```
After logging in, change the password using the command:
```shell
argocd account update-password
argocd relogin
```
## Create Kubeflow deployment repo
1. Create a git repo to store your Kubeflow configuration.
2. If you did not use the `kfctl.sh` script to create your Kubernetes cluster and generate the Kubernetes resources:
1. Run the following script to download `kfctl.sh`:
* NOTE: There is a [known issue](https://github.com/kubeflow/kubeflow/issues/1145) with the IAP component that prevents the envoy service from becoming synced and causes all subsequent syncs to fail. As a workaround for this issue, we recommend that you sync individual resources by adding the resource flag to your sync command.
Once the sync has finished, you can then access your Kubeflow UI by going to `https://<KFAPP>.endpoint.<PROJECT>.cloud.googl/`
* It can take 10–15 minutes for the endpoint to become available. Kubeflow needs to provision a signed SSL certificate and register a DNS name.
## Going forward
When you commit a change that modifies the ksonnet application directory of your Kubeflow repository (the ks_app directory if you used the kfctl.sh script), Argo CD will detect that your application is out of sync with your git repo. To sync the new resource, you can run
Please go to the [Argo CD documentation](https://github.com/argoproj/argo-cd/tree/master/docs#argocd-documentation) to read more about how to configure other features like auto-sync, SSO, RBAC, and more!