<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Kubeflow – Fairing on GCP</title>
    <link>/docs/components/fairing/gcp/</link>
    <description>Recent content in Fairing on GCP on Kubeflow</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
	  <atom:link href="/docs/components/fairing/gcp/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: Configure Kubeflow Fairing with Access to GCP</title>
      <link>/docs/components/fairing/gcp/configure-gcp/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/gcp/configure-gcp/</guid>
      <description>
        
        
        &lt;p&gt;This guide describes how to configure your development environment with access
to Google Cloud Platform (GCP), so you can use Kubeflow Fairing to train or
deploy a model on Kubeflow on Google Kubernetes Engine (GKE).&lt;/p&gt;
&lt;p&gt;If you have not installed Kubeflow Fairing, follow the guide to &lt;a href=&#34;/docs/components/fairing/install-fairing/&#34;&gt;installing
Kubeflow Fairing&lt;/a&gt; before continuing.&lt;/p&gt;
&lt;h2 id=&#34;using-kubeflow-fairing-with-kubeflow-notebooks&#34;&gt;Using Kubeflow Fairing with Kubeflow notebooks&lt;/h2&gt;
&lt;p&gt;The standard Kubeflow notebook images include Kubeflow Fairing and come
preconfigured to run training jobs on your Kubeflow cluster. No additional
configuration is required.&lt;/p&gt;
&lt;p&gt;If your Kubeflow notebook server was built from a custom Jupyter Docker image,
follow the instruction in this guide to configure your notebooks environment
with access to your Kubeflow environment.&lt;/p&gt;
&lt;h2 id=&#34;install-and-configure-the-google-cloud-sdk&#34;&gt;Install and configure the Google Cloud SDK&lt;/h2&gt;
&lt;p&gt;Follow these instructions to set up the Google Cloud SDK in your local
development environment.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To check if you have the Google Cloud SDK installed, run the following
command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;which gcloud
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The response should be something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;/usr/bin/gcloud
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you do not have the Google Cloud SDK installed, follow the guide to
&lt;a href=&#34;https://cloud.google.com/sdk/docs/&#34;&gt;installing the Google Cloud SDK&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use &lt;code&gt;gcloud&lt;/code&gt; to set a default project.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;color:#204a87&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;PROJECT_ID&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&amp;lt;your-project-id&amp;gt;
gcloud config &lt;span style=&#34;color:#204a87&#34;&gt;set&lt;/span&gt; project &lt;span style=&#34;color:#000&#34;&gt;$PROJECT_ID&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Kubeflow Fairing needs a service account to make API calls to GCP. The
recommended way to provide Fairing with access to this
service account is to set the &lt;code&gt;GOOGLE_APPLICATION_CREDENTIALS&lt;/code&gt; environment
variable. To check for the &lt;code&gt;GOOGLE_APPLICATION_CREDENTIALS&lt;/code&gt; environment
variable, run the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;ls &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;$GOOGLE_APPLICATION_CREDENTIALS&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The response should be something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;/.../.../key.json
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you do not have a service account, then create one and grant it access
to the required roles.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;color:#204a87&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;SA_NAME&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&amp;lt;your-sa-name&amp;gt;
gcloud iam service-accounts create &lt;span style=&#34;color:#000&#34;&gt;$SA_NAME&lt;/span&gt;
gcloud projects add-iam-policy-binding &lt;span style=&#34;color:#000&#34;&gt;$PROJECT_ID&lt;/span&gt; &lt;span style=&#34;color:#4e9a06&#34;&gt;\ &lt;/span&gt;
    --member serviceAccount:&lt;span style=&#34;color:#000&#34;&gt;$SA_NAME&lt;/span&gt;@&lt;span style=&#34;color:#000&#34;&gt;$PROJECT_ID&lt;/span&gt;.iam.gserviceaccount.com &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --role &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;roles/editor&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create a key for your service account.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;gcloud iam service-accounts keys create ~/key.json &lt;span style=&#34;color:#4e9a06&#34;&gt;\
&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&lt;/span&gt;    --iam-account &lt;span style=&#34;color:#000&#34;&gt;$SA_NAME&lt;/span&gt;@&lt;span style=&#34;color:#000&#34;&gt;$PROJECT_ID&lt;/span&gt;.iam.gserviceaccount.com
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create the &lt;code&gt;GOOGLE_APPLICATION_CREDENTIALS&lt;/code&gt; environment variable.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;color:#204a87&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;GOOGLE_APPLICATION_CREDENTIALS&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;~/key.json
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;configure-docker-with-access-to-container-registry&#34;&gt;Configure Docker with access to Container Registry&lt;/h2&gt;
&lt;p&gt;Authorize Docker to access your &lt;a href=&#34;https://cloud.google.com/container-registry/&#34;&gt;GCP Container Registry&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;gcloud auth configure-docker
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;configure-access-to-your-kubeflow-cluster&#34;&gt;Configure access to your Kubeflow cluster&lt;/h2&gt;
&lt;p&gt;Use the following instructions to update your &lt;code&gt;kubeconfig&lt;/code&gt; with credentials
and endpoint information for your Kubeflow cluster. If you do not have a
Kubeflow cluster, follow the guide to &lt;a href=&#34;/docs/gke/deploy/&#34;&gt;deploying Kubeflow on
GKE&lt;/a&gt; to set one up.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To find your cluster&amp;rsquo;s name, run the following command to list the
clusters in your project:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;gcloud container clusters list
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Update the following command with your cluster&amp;rsquo;s name and GCP zone. Then,
run the command to update your &lt;code&gt;kubeconfig&lt;/code&gt; to provide it with credentials
to access this cluster.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;color:#204a87&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;CLUSTER_NAME&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;kubeflow
&lt;span style=&#34;color:#204a87&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#000&#34;&gt;ZONE&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;us-central1-a
gcloud container clusters get-credentials &lt;span style=&#34;color:#000&#34;&gt;$CLUSTER_NAME&lt;/span&gt; --region &lt;span style=&#34;color:#000&#34;&gt;$ZONE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Follow the &lt;a href=&#34;/docs/components/fairing/gcp/tutorials/&#34;&gt;GCP samples and tutorials&lt;/a&gt; to learn more about how to run
training jobs remotely on GCP with Kubeflow Fairing.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: GCP Samples and Tutorials</title>
      <link>/docs/components/fairing/gcp/tutorials/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/gcp/tutorials/</guid>
      <description>
        
        
        
      </description>
    </item>
    
  </channel>
</rss>
