https://github.com/574n13y/gcp-kubernetes-1
Google Cloud compute options for Kubernetes
https://github.com/574n13y/gcp-kubernetes-1
gcp kubectl kubernetes kubernetes-cluster kubernetes-deployment
Last synced: 2 months ago
JSON representation
Google Cloud compute options for Kubernetes
- Host: GitHub
- URL: https://github.com/574n13y/gcp-kubernetes-1
- Owner: 574n13y
- License: mit
- Created: 2024-01-28T11:34:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-29T12:20:55.000Z (over 1 year ago)
- Last Synced: 2025-02-01T20:30:30.461Z (4 months ago)
- Topics: gcp, kubectl, kubernetes, kubernetes-cluster, kubernetes-deployment
- Language: Python
- Homepage: https://574n13y.github.io/GCP-kubernetes-1/
- Size: 9.38 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GCP-kubernetes
## Google Cloud compute options for Kubernetes -> Getting started with GKE## Prerequisites: Ensure that the GKE and Cloud operations API are enabled in your GCP project.
- Start by setting the project id
```
PROJECT_ID=”"
```

- Enable the GKE API & Enable the Cloud operations API
```
gcloud services enable apigateway.googleapis.com
gcloud services enable servicemanagement.googleapis.com
gcloud services enable servicecontrol.googleapis.com
```
- Start by setting the project ID using the below command:
```
gcloud config set project <
```
- Set the compute zone for the cluster. For this demo, we will be using the zone us-central1-a
```
gcloud config set compute/zone us-central1-a
```
- Let’s now create a GKE standard cluster named ‘testcluster’, with default settings and single node in the node pool with auto scaling enabled
```
gcloud container clusters create hello-cluster — enable-autoscaling — min-nodes=1 — max-nodes=3
```
- Clone the Microservices demo application
```
git clone https://github.com/574n13y/microservices-demo.git
cd microservices-demo
```
- Deploy the sample application to the GKE cluster
```
kubectl apply -f ./release/kubernetes-manifests.yaml
```
- Once the deployment is completed successfully, you should be able to see the namespace
```
kubectl get ns
```
- Once the deployment is completed successfully, you should be able to see the pods associated with the application using the following command
```
kubectl get pods
```
- Access the application using its external IP address at Port 80
```
kubectl get service frontend-external | awk '{print $4}'
```

- Alternatively, you can also browse to Kubernetes Engine service in GCP portal -> services and ingress and look for the endpoint of the service named “frontend-external”.
- The application will open once you click on the link:





**********