GithubHelp home page GithubHelp logo

gdg-demo's Introduction

GDG Demo

Sessions and links

Prequisite

  • gcloud with initial account and project
  • kubectl
  • helm

Kubernetes Tutorials

Create GKE Cluster

gcloud container clusters create gdg-demo --num-nodes 4 --zone asia-southeast1-a
# Wait for few minutes
  • Walkthrough GKE features
    • Create Cluster with one click
    • High Availability Cluster
    • Choose Kubernetes Version
    • Create pools and choose number of nodes
    • Nodes autoscaling
    • Size of nodes
    • Preemptible nodes
    • Networking to do private cluster
    • Shielded GKE Nodes
    • Create GKE Cluster with command line
    • See created cluster for one click upgrade available option

Deploy Pod

kubectl apply -f 01-pod.yaml
kubectl get pod
kubectl exec -it linux -c busybox -- sh
ping www.google.com
kubectl exec -it linux -c alpine -- sh
ping www.google.com
  • Walkthrought Workloads Dashboard
    • Overview configuration
    • CPU, Memory, Disk
    • Events
    • Logs
    • YAML

Deploy Nginx Deployment

kubectl apply -f 02-deployment.yaml
kubectl get deployment
kubectl get pod
watch kubectl get pod
# Scale replica to 3 on dashboard

Deploy Nginx Service

kubectl apply -f 03-service-nginx-lb.yaml
kubectl get service -w
# Wait for few minutes until EXTERNAL-IP shows up
# Try to access to Nginx
  • Walkthrough Services & Ingress Dashboard

Deploy MariaDB with ClusterIP Service

kubectl apply -f 04-mariadb.yaml
kubectl get deployment
kubectl get pod -w
kubectl get service
# Wait for a minute to fully start MariaDB

# Test connect to MariaDB
kubectl exec -it linux -c busybox -- sh
telnet mariadb 3306

Deploy Ingress

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx
kubectl get deployment
kubectl get pod -w
kubectl get service -w
# Try to access to http://ipaddress
  • Deploy Ingress to Nginx Service
kubectl apply -f 05-ingress-to-nginx.yaml
# Try to access from http://ipadress/nginx
  • Deploy Ingress to Apache Service
kubectl apply -f 06-apache.yaml
# Try to access from http://ipadress/apache

Namespace

kubectl get namespace
kubectl create namespace dev
kubectl get namespace
kubectl apply -f 02-deployment.yaml --namespace dev
kubectl get pod
kubectl get pod --namespace dev

Rolling Update

watch -n1 kubectl get pod
# Rolling Update on Dashboard to httpd image

Bonus install Wordpress with Helm

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install wordpress bitnami/wordpress
kubectl get pod -w
kubectl get service -w
# Access via http://ipaddress

Destroy Everything

gcloud container clusters delete gdg-demo --zone asia-southeast1-a

gdg-demo's People

Contributors

jirayut-opsta avatar winggundamth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.