<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.dersllc.com/index.php?action=history&amp;feed=atom&amp;title=VMware%2Fk8s</id>
	<title>VMware/k8s - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.dersllc.com/index.php?action=history&amp;feed=atom&amp;title=VMware%2Fk8s"/>
	<link rel="alternate" type="text/html" href="http://wiki.dersllc.com/index.php?title=VMware/k8s&amp;action=history"/>
	<updated>2026-05-05T21:24:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>http://wiki.dersllc.com/index.php?title=VMware/k8s&amp;diff=11&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;= General Kubernetes Documentation = == Setup Artifactory Proxy to GCR ==  https://jfrog.com/knowledge-base/artifactory-how-to-proxy-a-google-container-registry-gcr/#:~:text=ARTIFACTORY%3A%20How%20to%20proxy%20a%20Google%20Container%20Registry%20(GCR)%3F,-Elina%20Floim&amp;text=Google%20offers%20the%20https%3A%2F%2F,according%20to%20the%20needed%20endpoint.&amp;text=Click%20on%20%E2%80%9CADD%20KEY%E2%80%9D%2C,file%20in%20an%20accessible%20location.  == Setup GCR.IO Registry == 1...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.dersllc.com/index.php?title=VMware/k8s&amp;diff=11&amp;oldid=prev"/>
		<updated>2023-06-02T19:05:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= General Kubernetes Documentation = == Setup Artifactory Proxy to GCR ==  https://jfrog.com/knowledge-base/artifactory-how-to-proxy-a-google-container-registry-gcr/#:~:text=ARTIFACTORY%3A%20How%20to%20proxy%20a%20Google%20Container%20Registry%20(GCR)%3F,-Elina%20Floim&amp;amp;text=Google%20offers%20the%20https%3A%2F%2F,according%20to%20the%20needed%20endpoint.&amp;amp;text=Click%20on%20%E2%80%9CADD%20KEY%E2%80%9D%2C,file%20in%20an%20accessible%20location.  == Setup GCR.IO Registry == 1...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= General Kubernetes Documentation =&lt;br /&gt;
== Setup Artifactory Proxy to GCR ==&lt;br /&gt;
 https://jfrog.com/knowledge-base/artifactory-how-to-proxy-a-google-container-registry-gcr/#:~:text=ARTIFACTORY%3A%20How%20to%20proxy%20a%20Google%20Container%20Registry%20(GCR)%3F,-Elina%20Floim&amp;amp;text=Google%20offers%20the%20https%3A%2F%2F,according%20to%20the%20needed%20endpoint.&amp;amp;text=Click%20on%20%E2%80%9CADD%20KEY%E2%80%9D%2C,file%20in%20an%20accessible%20location.&lt;br /&gt;
&lt;br /&gt;
== Setup GCR.IO Registry ==&lt;br /&gt;
1. Enable Google Container Registry&lt;br /&gt;
&lt;br /&gt;
2. Setup Service Account via IAM Console. https://console.cloud.google.com/iam-admin/serviceaccounts &amp;lt;br&amp;gt;&lt;br /&gt;
3. Create a Key for the Service Account (JSON) and download the JSON file. &amp;lt;br&amp;gt;&lt;br /&gt;
4. Transfer the JSON file to the JUMPBOX. &amp;lt;br&amp;gt;&lt;br /&gt;
5. Log into GCR via docker.&lt;br /&gt;
 docker login -u _json_key --password-stdin https://gcr.io &amp;lt; {{highlight|keyfile.json}}&lt;br /&gt;
6. Push image to GCR.IO &lt;br /&gt;
 docker pull gcr.io/kuar-demo/kuard-amd64:blue&lt;br /&gt;
 docker tag gcr.io/kuar-demo/kuard-amd64:blue gcr.io/{{highlight|&amp;lt;GCR PROJECT&amp;gt;}}/kuard:latest&lt;br /&gt;
 docker push gcr.io/{{highlight|&amp;lt;GCR PROJECT&amp;gt;}}/kuard:latest&lt;br /&gt;
7. Create docker Registry Secret&lt;br /&gt;
 kubectl create secret docker-registry gcr-json-key \&lt;br /&gt;
 --docker-server=gcr.io \&lt;br /&gt;
 --docker-username=_json_key \&lt;br /&gt;
 --docker-password=&amp;quot;$(cat ~/{{highlight|keyfile.json}})&amp;quot; \&lt;br /&gt;
 --docker-email={{highlight|&amp;lt;valid-email&amp;gt;}}&lt;br /&gt;
8. Set Default K8s Service Account to use the registry secret&lt;br /&gt;
 kubectl patch serviceaccount default \&lt;br /&gt;
 -p &amp;#039;{&amp;quot;imagePullSecrets&amp;quot;: [{&amp;quot;name&amp;quot;: &amp;quot;gcr-json-key&amp;quot;}]}&amp;#039;&lt;br /&gt;
9. Create the KUARD deployment YAML&lt;br /&gt;
 cat &amp;lt;&amp;lt;EOF &amp;gt; kuard-deployment-gcr.yaml&lt;br /&gt;
 apiVersion: apps/v1&lt;br /&gt;
 kind: Deployment&lt;br /&gt;
 metadata:&lt;br /&gt;
   name: kuard-deployment&lt;br /&gt;
   labels:&lt;br /&gt;
     app: kuard&lt;br /&gt;
 spec:&lt;br /&gt;
   replicas: 3&lt;br /&gt;
   selector:&lt;br /&gt;
     matchLabels:&lt;br /&gt;
       app: kuard&lt;br /&gt;
   template:&lt;br /&gt;
     metadata:&lt;br /&gt;
       labels:&lt;br /&gt;
         app: kuard&lt;br /&gt;
     spec:&lt;br /&gt;
       imagePullSecrets:&lt;br /&gt;
         - name: regcred&lt;br /&gt;
       containers:&lt;br /&gt;
         - image: gcr.io/{{highlight|&amp;lt;GCR PROJECT&amp;gt;}}/kuard:latest&lt;br /&gt;
           name: kuard&lt;br /&gt;
           ports:&lt;br /&gt;
             - containerPort: 8080&lt;br /&gt;
               name: http&lt;br /&gt;
 ---&lt;br /&gt;
 apiVersion: v1&lt;br /&gt;
 kind: Service&lt;br /&gt;
 metadata:&lt;br /&gt;
   name: kuard-service&lt;br /&gt;
 spec:&lt;br /&gt;
   type: LoadBalancer&lt;br /&gt;
   selector:&lt;br /&gt;
     app: kuard&lt;br /&gt;
   ports:&lt;br /&gt;
   - port: 80&lt;br /&gt;
     targetPort: 8080&lt;br /&gt;
 EOF&lt;br /&gt;
10. Deploy the KUARD Deployment.&lt;br /&gt;
 kubectl apply  -f kuard-deployment-gcr.yaml&lt;br /&gt;
11. Check that the containers are up and running.&lt;br /&gt;
 kubectl get pods&lt;br /&gt;
12. Get the External Service IP that will be hosting KUARD.&lt;br /&gt;
 kubectl get service kuard-service&lt;br /&gt;
13. Test that you can access the KUARD URL from a Web Browser&lt;br /&gt;
 http://{{highlight|&amp;lt;EXTERNAL-IP&amp;gt;}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>