<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Deploy a GKE cluster in 5 minutes in DevSecOps</title>
    <link>https://community.checkpoint.com/t5/DevSecOps/Deploy-a-GKE-cluster-in-5-minutes/m-p/99769#M15</link>
    <description>&lt;H1&gt;Deploy a GKE cluster in 5 minutes&lt;/H1&gt;
&lt;P&gt;Here is a couple of scripts that automate deploying Kubernetes cluster (GKE) on Google Cloud Platform. You could use automation tools like Terraform to do this but this is just another way of automating the same thing. Whether you're doing a quick test or demo/POC, you can use this very simple shell script to deploy a GKE cluster in 5 minutes, and clean it up in about 3 minutes. Basically, one script to create a cluster with a demo app, and another script to clean up.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You will need to have an account on Google Cloud Platform and should have created a project.&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;gke_setup.sh&lt;/H3&gt;
&lt;P&gt;Before executing the script, please update the following values in the script:&lt;/P&gt;
&lt;DIV class="highlight highlight-source-shell"&gt;
&lt;PRE&gt;&lt;SPAN class="pl-c"&gt;#UPDATE THIS with your GCP Project Name&lt;/SPAN&gt;
PROJECT_ID=&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;YOUR_PROJECT_NAME&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;

&lt;SPAN class="pl-c"&gt;#UPDATE THIS with the location of Docker Image of your choice&lt;/SPAN&gt;
IMAGE=&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;gcr.io/&lt;SPAN class="pl-smi"&gt;$PROJECT_ID&lt;/SPAN&gt;/your-docker-image:v1&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;And basically execute the script, and provide the following when the script prompts:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Your Cluster name (Default is my-cluster)&lt;/LI&gt;
&lt;LI&gt;App Name (Default is demo-app)&lt;/LI&gt;
&lt;LI&gt;GCP Region (Default is asia-southeast1)&lt;/LI&gt;
&lt;LI&gt;Your Kubernetes service name (Default is my-service)&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="highlight highlight-source-shell"&gt;
&lt;PRE&gt;./gke_setup.sh&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now you have a working cluster! Note down the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Load Balancer's IP&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;and access it on the browser. At this point, you should see the demo app.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample demo app" style="width: 519px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/8533i1AF50848ABE9A6BA/image-dimensions/519x449?v=v2" width="519" height="449" role="button" title="k8s-demo-app.png" alt="Sample demo app" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Sample demo app&lt;/span&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;cleanup_cluster.sh&lt;/H3&gt;
&lt;P&gt;This is the script that deletes and cleans up GKE clusters. The script will basically delete deployments, and services before deleting the cluster itself.&lt;/P&gt;
&lt;P&gt;Execute the script:&lt;/P&gt;
&lt;DIV class="highlight highlight-source-shell"&gt;
&lt;PRE&gt;&lt;SPAN class="pl-c1"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;Y&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="pl-k"&gt;|&lt;/SPAN&gt; ./cleanup_cluster.sh&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;Note: Add&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;echo "Y" |&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;before the script to auto-answer Yes to a prompt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Where to download the scripts?&lt;/H2&gt;
&lt;P&gt;See my original Github repo here&amp;nbsp;&lt;A href="https://github.com/jaydenaung/gkelab" target="_blank"&gt;https://github.com/jaydenaung/gkelab&lt;/A&gt;&amp;nbsp;to use the scripts!&lt;/P&gt;
&lt;H2&gt;How about a security posture assessment?&lt;/H2&gt;
&lt;P&gt;Once you've deployed your cluster, I'd strongly recommend that you check out my article on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://medium.com/@jaydenaung/securing-kubernetes-environments-with-check-point-cloudguard-cspm-ea23e69d5f7c" rel="nofollow" target="_blank"&gt;how to run a security posture assessment on your Kubernetes cluster using CloudGuard CSPM.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jayden Aung&lt;/P&gt;</description>
    <pubDate>Thu, 22 Oct 2020 01:53:54 GMT</pubDate>
    <dc:creator>JaydenAung</dc:creator>
    <dc:date>2020-10-22T01:53:54Z</dc:date>
    <item>
      <title>Deploy a GKE cluster in 5 minutes</title>
      <link>https://community.checkpoint.com/t5/DevSecOps/Deploy-a-GKE-cluster-in-5-minutes/m-p/99769#M15</link>
      <description>&lt;H1&gt;Deploy a GKE cluster in 5 minutes&lt;/H1&gt;
&lt;P&gt;Here is a couple of scripts that automate deploying Kubernetes cluster (GKE) on Google Cloud Platform. You could use automation tools like Terraform to do this but this is just another way of automating the same thing. Whether you're doing a quick test or demo/POC, you can use this very simple shell script to deploy a GKE cluster in 5 minutes, and clean it up in about 3 minutes. Basically, one script to create a cluster with a demo app, and another script to clean up.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You will need to have an account on Google Cloud Platform and should have created a project.&lt;/EM&gt;&lt;/P&gt;
&lt;H3&gt;gke_setup.sh&lt;/H3&gt;
&lt;P&gt;Before executing the script, please update the following values in the script:&lt;/P&gt;
&lt;DIV class="highlight highlight-source-shell"&gt;
&lt;PRE&gt;&lt;SPAN class="pl-c"&gt;#UPDATE THIS with your GCP Project Name&lt;/SPAN&gt;
PROJECT_ID=&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;YOUR_PROJECT_NAME&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;

&lt;SPAN class="pl-c"&gt;#UPDATE THIS with the location of Docker Image of your choice&lt;/SPAN&gt;
IMAGE=&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;gcr.io/&lt;SPAN class="pl-smi"&gt;$PROJECT_ID&lt;/SPAN&gt;/your-docker-image:v1&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;And basically execute the script, and provide the following when the script prompts:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Your Cluster name (Default is my-cluster)&lt;/LI&gt;
&lt;LI&gt;App Name (Default is demo-app)&lt;/LI&gt;
&lt;LI&gt;GCP Region (Default is asia-southeast1)&lt;/LI&gt;
&lt;LI&gt;Your Kubernetes service name (Default is my-service)&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class="highlight highlight-source-shell"&gt;
&lt;PRE&gt;./gke_setup.sh&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now you have a working cluster! Note down the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Load Balancer's IP&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;and access it on the browser. At this point, you should see the demo app.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sample demo app" style="width: 519px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/8533i1AF50848ABE9A6BA/image-dimensions/519x449?v=v2" width="519" height="449" role="button" title="k8s-demo-app.png" alt="Sample demo app" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Sample demo app&lt;/span&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;H3&gt;cleanup_cluster.sh&lt;/H3&gt;
&lt;P&gt;This is the script that deletes and cleans up GKE clusters. The script will basically delete deployments, and services before deleting the cluster itself.&lt;/P&gt;
&lt;P&gt;Execute the script:&lt;/P&gt;
&lt;DIV class="highlight highlight-source-shell"&gt;
&lt;PRE&gt;&lt;SPAN class="pl-c1"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;Y&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="pl-k"&gt;|&lt;/SPAN&gt; ./cleanup_cluster.sh&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;Note: Add&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;echo "Y" |&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;before the script to auto-answer Yes to a prompt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Where to download the scripts?&lt;/H2&gt;
&lt;P&gt;See my original Github repo here&amp;nbsp;&lt;A href="https://github.com/jaydenaung/gkelab" target="_blank"&gt;https://github.com/jaydenaung/gkelab&lt;/A&gt;&amp;nbsp;to use the scripts!&lt;/P&gt;
&lt;H2&gt;How about a security posture assessment?&lt;/H2&gt;
&lt;P&gt;Once you've deployed your cluster, I'd strongly recommend that you check out my article on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://medium.com/@jaydenaung/securing-kubernetes-environments-with-check-point-cloudguard-cspm-ea23e69d5f7c" rel="nofollow" target="_blank"&gt;how to run a security posture assessment on your Kubernetes cluster using CloudGuard CSPM.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jayden Aung&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 01:53:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/DevSecOps/Deploy-a-GKE-cluster-in-5-minutes/m-p/99769#M15</guid>
      <dc:creator>JaydenAung</dc:creator>
      <dc:date>2020-10-22T01:53:54Z</dc:date>
    </item>
  </channel>
</rss>

