Skip to content

mluker/k8s-devcontainer-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample devcontainer

Introduction

This repository is set up for development with GitHub Codespaces and VS Code Dev Containers.

Included Utilities

  • Docker-in-Docker (with Docker Compose v2 support)
  • Helm
  • KinD (Kubernetes in Docker)
  • kubectl
  • Azure CLI

What now?

Fire up the devcontainer

Once it has started, from the command line run

kind cluster create

You now have a kubernetes cluster running in Kind. Interact with it using kubectl commands.

Deploy

kubectl apply -f base/deployment.yaml

You can also deploy using kustomize to leverage templates and dev and prod values patching.

kubectl apply -k overlays/dev

or

kubectl apply -k overlays/prod

Deploy Dashboard UI

helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm install --create-namespace kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard

Add sample user for dashboard

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kubernetes-dashboard
EOF

Get token for Dashboard login

kubectl -n kubernetes-dashboard create token admin-user

Visit http://localhost:8001/api/v1/namespaces/default/services/https:kubernetes-dashboard:https/proxy/#/pod?namespace=default

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published