Skip to content

Instantly share code, notes, and snippets.

@tvvignesh tvvignesh/Kubernetes.md
Last active Sep 15, 2018

Embed
What would you like to do?
Run Docker containers via Kubernetes (in progress)

Kubernetes

Install Virtualbox - https://www.virtualbox.org/wiki/Linux_Downloads

Install Kubectl - https://kubernetes.io/docs/tasks/tools/install-kubectl/

Install Minikube - https://kubernetes.io/docs/tasks/tools/install-minikube/

Set ENV - https://stackoverflow.com/questions/42564058/how-to-use-local-docker-images-with-minikube

kubectl get pods

kubectl logs skeleton-server-6597748cc5-fxzhl -p

kubectl describe po skeleton-server-6597748cc5-fxzhl

kubectl get nodes

kubectl get svc

delete all pods

kubectl delete --all pods --namespace=default

delete all deployments

kubectl delete --all deployments --namespace=default

delete all services

kubectl delete --all services --namespace=default

Get minikube ip - minikube ip

Build compose image - docker-compose build

kubectl run skeleton-server --image=skeletonserver_app-server:latest --image-pull-policy=Never --port=8085 --env="NODEJS_PORT=8085" --env="NODE_ENV=development" --env="NODEJS_IP=0.0.0.0"

kubectl expose deployment skeleton-server --type=LoadBalancer --name=skeleton-service --port=9100 --target-port=8085

kubectl describe services skeleton-service

kubectl get service skeleton-service

curl 192.168.99.100:31731

Port Forwarding (optional)

kubectl port-forward skeleton-server-7ddcd8449c-fdtx6 9100:9000

User Interface

kubectl proxy http://localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy

Docker Registry

https://docs.docker.com/registry/deploying/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.