ueokande / k8s-nginx

nginx cluster with k8s

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

k8s-nginx

This is my playground for kubernetes.

Deployment and pods

Create a deployment and pods by kubectl create command`,

kubectl create -f deployment.yaml

Create a service by kubectl create command`,

kubectl create -f service.yaml

Check URL to service for minikube node.

minikube service nginx-service --url

Trouble shoothing

CHecking deployment:

kubectl get deployments
kubectl describe deployments 

Checking created and pods:

kubectl get pods
kubectl describe pods

Checking services:

kubectl get services
kubectl describe service

Isolate the cause of the problem

# Get pods' IP address
kubectl get pods --output=wide

# Login to node
minikube ssh

# Check in node
docker ps
curl ${pod's ip}

Open kubernetes dashboard.

minikube service --namespace kube-system  kubernetes-dashboard

About

nginx cluster with k8s