https://github.com/developer-guy/gophercon-turkiye-2021-hands-on
GopherCon Turkiye 2021 - Kubernetes'i kendi ihtiyaçlarımıza göre nasıl özelleştirdik ?
https://github.com/developer-guy/gophercon-turkiye-2021-hands-on
gcloud gke gke-cluster go golang google-cloud-function google-cloud-functions google-kubernetes-engine kubernetes validating-admission-webhook validating-webhook
Last synced: about 1 year ago
JSON representation
GopherCon Turkiye 2021 - Kubernetes'i kendi ihtiyaçlarımıza göre nasıl özelleştirdik ?
- Host: GitHub
- URL: https://github.com/developer-guy/gophercon-turkiye-2021-hands-on
- Owner: developer-guy
- Created: 2021-05-28T20:47:53.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-30T09:11:49.000Z (about 5 years ago)
- Last Synced: 2025-02-26T05:41:27.795Z (over 1 year ago)
- Topics: gcloud, gke, gke-cluster, go, golang, google-cloud-function, google-cloud-functions, google-kubernetes-engine, kubernetes, validating-admission-webhook, validating-webhook
- Language: Go
- Homepage: https://gist.github.com/developer-guy/7157267bd276fa52d02effbadfaa022a
- Size: 194 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## GopherCon Turkiye 2021 - Kubernetes'i kendi ihtiyaçlarımıza göre nasıl özelleştirdik ?

> Slides: https://docs.google.com/presentation/d/1v-pwXe5izWIF9v_pkpsjqb2c-2CZe9EEDda17tqaVgg/edit?usp=sharing
### Prerequisites
* gcloud 342.0.0
* Kubernetes v1.19.9
* kubectl v1.21.1
### Tutorial
Start with defining the name of GKE (Google Kubernetes Engine) Cluster as an environment variable.
```bash
$ export GKE_DEMO_CLUSTER_NAME=gophercon-turkiye-2021-hands-on
```
Let's create the GKE Cluster.
```bash
$ gcloud container clusters create $GKE_DEMO_CLUSTER_NAME --num-nodes=2
```
Once it's created, fetch the cluster credentials in order to work properly with `kubectl` a CLI tool for interacting with Kubernetes.
```bash
$ gcloud container clusters get-credentials $GKE_DEMO_CLUSTER_NAME
```
Verify if everything is working before move on to the next step.
```bash
$ kubectl get nodes -o wide
```
Now, it is time for deploying our first Google Cloud Function.
```bash
$ gcloud functions deploy Validate --runtime go113 --trigger-http --allow-unauthenticated
```
Once it's deployed, let's grap the url of the function for later use.
```bash
$ CLOUD_FUNCTION_URL=$(gcloud functions describe --format=json Validate | jq -r '.httpsTrigger.url')
$ echo $CLOUD_FUNCTION_URL
```
Now we are ready to register this functions as a `ValidatingWebhookConfiguration` in our cluster.
```bash
$ cat <