{"id":16179267,"url":"https://github.com/jonashackt/kubernetes-lab","last_synced_at":"2026-01-28T02:03:17.688Z","repository":{"id":147269906,"uuid":"109399066","full_name":"jonashackt/kubernetes-lab","owner":"jonashackt","description":"Kubernetes Hands-On 03.11.2017 codecentric Frankfurt","archived":false,"fork":false,"pushed_at":"2017-11-05T17:00:50.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-31T03:32:59.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smarty","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonashackt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-03T13:32:02.000Z","updated_at":"2017-11-03T13:34:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0e94d25-18c5-438d-a932-f984d5a5815c","html_url":"https://github.com/jonashackt/kubernetes-lab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonashackt/kubernetes-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fkubernetes-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fkubernetes-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fkubernetes-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fkubernetes-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonashackt","download_url":"https://codeload.github.com/jonashackt/kubernetes-lab/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashackt%2Fkubernetes-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28833389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"online","status_checked_at":"2026-01-28T02:00:06.943Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T05:26:30.568Z","updated_at":"2026-01-28T02:03:17.674Z","avatar_url":"https://github.com/jonashackt.png","language":"Smarty","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubernetes Hands-On 03.11.2017 Frankfurt cc\n\n## Links\n\n2 day workshop: https://github.com/kelseyhightower/kubernetes-the-hard-way\n\nhttps://reactdom.com/blog/kubernetes-books\n\n\n\n## Kubernetes 101\n\n* possible: \n** multi-cloud (Azure + AWS + x)\n** hybrid (On-premise + Cloud)\n\nKubernetes: no guarantee, how long Containers are available (no WebSphere!)\n\nMaster-Node - always API server\n\n\n### Pods\n\nPod - for local communication between Containers (named-pipe, Unix-socket)\n--\u003e no complete Webstack in one Pod\n--\u003e Sidecar:\n** (Service mesh to communicate with Service on all nodes with same port)\n** Eureka-connectivity for Ruby app\n\n\n### Replication Controller / Deployment\n\nScheduler-Container also contains Replication Controller\n\nReplication Controller = how many replicas should my service have\n\nDeployment = Pod + Replication Controller\n\n\n### Kubernetes manifests (Yaml)\n\n```\nspec\n\tresources\n\t\trequests:\n\t\t\t--\u003e Bursts for short time is possible\n\t\t\tcpu: 100m (100 milli CPUs = 0,1 CPUs)\n\t\t\tmemory: 100Mi (1:1 MB RAM) --\u003e set appropriate Heap to Java-App! Attention - JVM has it´s own Memory-Management!!! Apps see not the 100MB Kubernetes limits, but the host complete RAM (Ansible/Helm-Chart has to set both parameters together)\n\t\t\t...\n```\n\n\n### Services\n\nendpoint for Pods (--\u003e Incoming requests) or external Endpoint (\u003c-- Outgoing requests) - 2nd with mocking in staging\n\nENV or DNS\n\n\n| Service |\n\n   |  |\n   |  |\n\n|Pod| |Pod|\n\nRouting Tables from ext IP to Pod-IPs or Routing Mesh\n\n\n### Kubernetes Labels\n\nmighty!\n\nKubernetes Labels --\u003e mapped onto Docker label\n\n```\n  template:\n    metadata:\n      labels:\n        app: confy\n        role: database\n```\n\n--\u003e for blue green deployments\n\n\n\n### Hands-On Prerequisites\n\nhttp://blog.nicolas-byl.eu/2017/03/13/javaland-countdown.html\n\nInstall kubectl - brew install kubectl\nInstall helm - brew install kubernetes-helm\nInstall deis - brew install deis\n\nkubectl - nice wrapper around Kubernetes REST API\n\nhttps://github.com/kubernetes/kops\n\nLogin to minikube VirtualBox: user: `docker` ; password: `tcuser` \n\n`minikube dashboard`  --\u003e open dashboard\n\n`kubectl apply -f lab1-kubectl/postgres-deployment.yml` --\u003e app deployment (inherits create)\n\n\n`kubectl get` --\u003e show, what´s possible\n\n`kubectl get po` --\u003e show running Pods, per namespace\n\n\n`kubectl get pods --all-namespaces -o wide` show every pod in all namespaces, don´t touch kube-system, if managed!\n\n`kubectl get pods --all-namespaces -o yaml`\n\nGet Services `kubectl get svc`\n\n\nStandard inspect of deployed Pods\n\n`kubectl describe pods confy-frontend-7685bd7747-6lwql`\n\n\n#### Scaling\n\n###### manual\n\n`kubectl scale deployment confy-frontend --replicas=3`\n\n`kubectl get po -w`\n\n#### Access Pods from outside world\n\nContainer-Ports\n\n```\nspec:\n  type: LoadBalancer\n```\n\nNode-Ports:\n\n```\nspec:\n  type: NodePort\n```\n\nGet Kubernetes IP: `minikube ip` or Dashboard\n\n`kubectl get svc` --\u003e get Ports of apps\n\nCall `http://192.168.99.100:32001/#/speakers/list` in Browser\n\n\n\n## Helm\n\nhttps://github.com/kubernetes/helm\n\nKubernetes Package Manager (like brew, chocolatey for OSses)\n\nRepositories for Kubernetes Artifacts, incl. history / versioning\n\nTiller (Server)\nHelm (Client CLI)\n\nYAML-Templates\n\n`helm init`\n\n\n\n#### Lab 2\n\n`helm install --name confy-queue --set rabbitmqUsername=confy,rabbitmqPassword=confy01 stable/rabbitmq`\n\nstable means stable things in Kubernetes, incubator is more bleeding\n\n\nHelm automatically makes all for you (Secrets, Claims for Volumes, Service, Deployment)\n\nSecrets for password encryption, provided as environment variable:\n\n```\n==\u003e v1/Secret\nNAME                       TYPE    DATA  AGE\nconfy-database-postgresql  Opaque  1     1s\n```\n\nVolumes via Claims\n\n```\n==\u003e v1/PersistentVolumeClaim\nNAME                       STATUS  VOLUME                                    CAPACITY  ACCESS MODES  STORAGECLASS  AGE\nconfy-database-postgresql  Bound   pvc-fdeaab18-c092-11e7-913c-08002745cf84  8Gi       RWO           standard      1s\n```\n\na Claims abstracts the concrete storage away - and moves it along with the Pods\n\nAccess-Modes - only (RW Only) for relational!, many (RW Many)\n\n\n\n\n## Delete old apps\n\n#### Deployments delete\n\n`kubectl get deploy`\n\n`kubectl delete deploy confy-frontend confy-database`\n\n#### delete Replica sets / Pods\n\n`kubectl get rs`\n\n`kubectl get po`\n\n--\u003e automatically by delete deploy\n\n#### Delete Services\n\n`kubectl delete svc confy-database confy-frontend` \n\n\n## Logs\n\n`kubectl logs PODName`\n\n## Watching stuff\n\n`brew install watch`\n\n`watch kubectl get po -a`\n\n#### Elasticsearch\n\nfluentd https://www.fluentd.org/ (instead of logstash w/o Kubernetes)\n\nhttps://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch\n\n\n\n\n## Databases\n\n#### Classical Relational DBs\n\n--\u003e Leave it OUTSIDE of Kubernetes!\n\n\n## How to setup Kubernetes Cluster?\n\nManage more then one Kubernetes-Cluster:\n\nAWS: https://github.com/kubernetes/kops (easiest way)\n\n\nTogehter with Ansible:\n\nkubeadm: https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ (non-AWS)\n\n--\u003e Windows: https://github.com/kubernetes/kubeadm/issues/364\n\n\nAnsible\n\nhttp://blog.kubernetes.io/2017/05/kubespray-ansible-collaborative-kubernetes-ops.html\n\nhttps://github.com/kubernetes-incubator/kubespray\n\n\nRancher 2.0\n\n\nEnterprise: CoreOS Tectonic (new, managed, good), OpenShift Redhad (months older)\n\n\n## Backup\n\nheptio https://heptio.com/opensource/\n\n\n## Access from outside\n\nAmazon ELB (costly)\n\nIngress, Ingress-Controller implementation Traefik! - as Service deployment in Kubernetes\n + Wildcard DNS\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonashackt%2Fkubernetes-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonashackt%2Fkubernetes-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonashackt%2Fkubernetes-lab/lists"}