{"id":30754247,"url":"https://github.com/twogg-git/go-k8s-server","last_synced_at":"2026-02-13T15:38:13.624Z","repository":{"id":83441598,"uuid":"348907898","full_name":"twogg-git/go-k8s-server","owner":"twogg-git","description":"Playing with k8s and golang","archived":false,"fork":false,"pushed_at":"2021-03-18T08:51:01.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T02:01:53.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twogg-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-03-18T01:52:19.000Z","updated_at":"2021-03-18T08:51:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"a669bb66-3235-4655-bbed-228d0d21454a","html_url":"https://github.com/twogg-git/go-k8s-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/twogg-git/go-k8s-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fgo-k8s-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fgo-k8s-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fgo-k8s-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fgo-k8s-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twogg-git","download_url":"https://codeload.github.com/twogg-git/go-k8s-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fgo-k8s-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273581237,"owners_count":25131393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"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":"2025-09-04T09:07:40.799Z","updated_at":"2026-02-13T15:38:08.593Z","avatar_url":"https://github.com/twogg-git.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KinD and Working K8s Locally\n\nhttps://kind.sigs.k8s.io/\n\nKinD is a tool for running local Kubernetes clusters using Docker container “nodes”. kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.\n\n\u003cimg src=\"https://d33wubrfki0l68.cloudfront.net/d0c94836ab5b896f29728f3c4798054539303799/9f948/logo/logo.png\" width=\"300\"\u003e\n\n## Requirements\n- Docker Desktop https://docs.docker.com/desktop/\n- Hub Docker account https://hub.docker.com/\n\n\n## Kubernetes 101\n- Pod: The smallest and simplest unit that you create or deploy in Kubernetes. A pod encapsulates one or more containers, storage resources, a unique network IP address, and options that govern how the containers should run.\n\n- Deployment: Can be viewed as an application encapsulating pods. It can contain one or more pods. Each pod has the same role, and the system automatically distributes requests to the pods of a Deployment.\n\n- Service: Used for pod access. With a fixed IP address, a Service forwards access traffic to pods and performs load balancing for these pods.\n\n- Ingress: Services forward requests based on Layer 4 TCP and UDP protocols. Ingresses can forward requests based on Layer 7 HTTPS and HTTPS protocols and make forwarding more targeted by domain names and paths.\n\n\u003cimg src=\"https://raw.githubusercontent.com/twogg-git/talks/master/resources/kubernetes_objects.png\" width=\"800\"\u003e\n\n## Describing a Kubernetes object\nHere's an example .yaml file that shows the required fields and object spec for a Kubernetes Deployment:\n\n```sh\napiVersion: extensions/v1beta1\nkind: Pod\nmetadata:\n  name: k8slatest\nspec:\n  replicas: 1\n  template:  \n    metadata:  \n      labels:  \n        env: k8slatest\n    spec:\n      containers:\n        - image: twogghub/k8s-workshop:1.1-rolling\n          imagePullPolicy: Always\n          name: k8slatest\n          ports:\n          - name: http\n            containerPort: 8080\n```\n\n```sh\napiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n  name: k8sprod\nspec:\n  replicas: 2\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxSurge: 1\n      maxUnavailable: 1\n  template:  \n    metadata:  \n      labels:  \n        env: prod\n    spec:\n      containers:\n        - image: twogghub/k8s-workshop:1.2-yaml\n          name: k8sprod\n          ports:\n          - name: http\n            containerPort: 8080\n```\n\n## Cluster Creation\n```sh\nkind create cluster --config k8s/kind.yaml\nkubectl apply -k k8s/control/\nkubectl config set-context --current --namespace=dev\n```\n\n## Nginx DNS\n```sh\nkubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml\nkubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s\n```\n\n## App Deployment\n```sh\nkubectl apply -k k8s/worker/\ncurl localhost/ping -H \"Host: k8s.demo.local\"\n```\n\n## Working with Golang\n```sh\ngo run main.go\ncurl 127.0.0.1:8080/test\n```\n\n## Testing in Docker\n```sh\ndocker build . -t twogghub/goserver:v1.2\ndocker run --name server -d -p 8080:8080 twogghub/goserver:v1.2\ncurl 127.0.0.1:8080/test\ndocker rm -f server\ndocker push twogghub/goserver:v1.2\n```\n\n## Deploying into the Cluster\n```sh\nkubectl apply -f k8s/deployment.yaml \ncurl localhost/test -H \"Host: k8s.demo.local\"\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwogg-git%2Fgo-k8s-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwogg-git%2Fgo-k8s-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwogg-git%2Fgo-k8s-server/lists"}