hi @Ayman
In course Kubernetes for the absolute beginners - hands On course
Module : Set up Kubernetes
Option 1 : Demo Minikube
As per the instructions I have downloaded the latest version of Oracle Virtual Box v 6.1 and launched it.
Downloaded the latest kubectl.exe and minikube-amd64-windows files from the website and installed them successfully as instructed.
I can see the pod is launched but not able to expose the serivice. Below is the output
Can you please help why is this issue and how to fix it ?
I can launch the dashboard and can see the dashboard in webpage of the localhost but not able to expose the service for the pod which is running.
====================================================
c:\kubernetes>
c:\kubernetes>kubectl get pod
NAME READY STATUS RESTARTS AGE
hello-minikube 1/1 Running 0 94s
c:\kubernetes>
c:\kubernetes>kubectl expose deployment hello-minikube --type=NodePort
Error from server (NotFound): deployments.apps “hello-minikube” not found
c:\kubernetes>kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-minikube 1/1 Running 0 4m14s
c:\kubernetes>kubectl expose deployment hello-minikube --type=Nodeport
Error from server (NotFound): deployments.apps “hello-minikube” not found
c:\kubernetes>kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready master 32m v1.18.3
c:\kubernetes>
c:\kubernetes>kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-minikube 1/1 Running 0 21m
c:\kubernetes>
c:\kubernetes>version
‘version’ is not recognized as an internal or external command,
operable program or batch file.
c:\kubernetes>minikube version
minikube version: v1.11.0
commit: 57e2f55f47effe9ce396cea42a1e0eb4f611ebbd
c:\kubernetes>kubectl version
Client Version: version.Info{Major:“1”, Minor:“18”, GitVersion:“v1.18.0”, GitCommit:“9e991415386e4cf155a24b1da15becaa390438d8”, GitTreeState:“clean”, BuildDate:“2020-03-25T14:58:59Z”, GoVersion:“go1.13.8”, Compiler:“gc”, Platform:“windows/amd64”}
Server Version: version.Info{Major:“1”, Minor:“18”, GitVersion:“v1.18.3”, GitCommit:“2e7996e3e2712684bc73f0dec0200d64eec7fe40”, GitTreeState:“clean”, BuildDate:“2020-05-20T12:43:34Z”, GoVersion:“go1.13.9”, Compiler:“gc”, Platform:“linux/amd64”}
c:\kubernetes>date
The current date is: 30/06/2020
Enter the new date: (dd-mm-yy)
c:\kubernetes>
c:\kubernetes>
c:\kubernetes>minikube dashboard
- Verifying dashboard health …
- Launching proxy …
- Verifying proxy health …
- Opening http://127.0.0.1:50377/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/ in your default browser…
I can see the dasboard properly but I can not expose the service for hello-minikube pod
===============================================================