Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems using the deployment service #8812

Closed
PzaZZ-8899 opened this issue Jul 23, 2020 · 5 comments
Closed

Problems using the deployment service #8812

PzaZZ-8899 opened this issue Jul 23, 2020 · 5 comments
Labels
kind/support Categorizes issue or PR as a support question. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@PzaZZ-8899
Copy link

Hi All,

This is my first post so go easy on me ;-)

I've installed kubectl and minikube onto my VM (Running VirtualBox). Software details are as follows :

Oracle Linux 8.2 (With the latest updates)
Docker 19.03.2 (Latest Release)
Minikube 1.18.3 (Latest release)

I can successfully install minikube and create the cluster. Services are started correctly and i can check the version and
get the status etc. However whenever i use the "deployment" service for the container all I get is deployment not found even though the container is correctly running. Any ideas ?

Output from the "kubctl get all" shows the container running ie pod/hello-minikube

If I try to delete the container again I get the error saying its not found again and neither can I delete it using 👍

kubectl delete hello-minikube

However ......

If i specify the pod as follows - i can succesfully delete the container 👍

kubectl delete pod/hello-minikube

The problem i have is that i can't use this syntax with the "deployment" service to get around the syntax obviously specifying the
resource type is incorrect. It seems that if I am able to specify the pod it works but if i dont i just get "not found"

Thanks for any help.

I hope this makes sense.

Simon.

@sharifelgamal
Copy link
Collaborator

Make sure to specify the proper namespace when calling kubectl get and kubectl delete. What does the output for kubectl get all show?

@sharifelgamal sharifelgamal added priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. kind/support Categorizes issue or PR as a support question. labels Jul 27, 2020
@PzaZZ-8899
Copy link
Author

Hi Sharif

Thanks for the response. Here are the details

[dockeruser@juggernaut ~]$ minikube start
😄 minikube v1.12.1 on Oracle 8.2 (vbox/amd64)
✨ Using the docker driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🔄 Restarting existing docker container for "minikube" ...
🐳 Preparing Kubernetes v1.18.3 on Docker 19.03.2 ...
🔎 Verifying Kubernetes components...
🌟 Enabled addons: default-storageclass, storage-provisioner
🏄 Done! kubectl is now configured to use "minikube"
[dockeruser@juggernaut ~]$

[dockeruser@juggernaut ~]$ kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080
pod/hello-minikube created
[dockeruser@juggernaut ~]$

[dockeruser@juggernaut ~]$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/hello-minikube 1/1 Running 0 68s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 443/TCP 14m
[dockeruser@juggernaut ~]$

[dockeruser@juggernaut ~]$ kubectl expose deployment hello-minikube --type=NodePort
Error from server (NotFound): deployments.apps "hello-minikube" not found
[dockeruser@juggernaut ~]$

[dockeruser@juggernaut ~]$ kubectl delete hello-minikube
error: the server doesn't have a resource type "hello-minikube"
[dockeruser@juggernaut ~]$

[dockeruser@juggernaut ~]$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/hello-minikube 1/1 Running 0 3m45s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 443/TCP 17m
[dockeruser@juggernaut ~]$

[dockeruser@juggernaut ~]$ kubectl delete pod/hello-minikube
pod "hello-minikube" deleted
[dockeruser@juggernaut ~]$

[dockeruser@juggernaut ~]$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:58:53Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/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"}
[dockeruser@juggernaut ~]$

So as you can see I can't reference the container unless I specify the pod name with the namespace and I can't use this syntax with the deployment service although as above it will work when deleting the namespace.

It could be that my syntax is wrong but I've seen many examples so I don't think this is the case.

Many thanks for your help.

Simon.

@PzaZZ-8899
Copy link
Author

Hi,

Here is the minikube version and linux kernel revision too
[dockeruser@juggernaut ~]$ minikube version
minikube version: v1.12.1
commit: 5664228-dirty
[dockeruser@juggernaut ~]$

[dockeruser@juggernaut ~]$ uname -a
Linux juggernaut 5.4.17-2011.3.2.1.el8uek.x86_64 #2 SMP Sun May 24 13:36:59 PDT 2020 x86_64 x86_64 x86_64 GNU/Linux
[dockeruser@juggernaut ~]$

Thanks,

Simon.

@sharifelgamal
Copy link
Collaborator

Are you sure you're creating a deployment when you're running kubectl run there? What does kubectl get deployment -A return?

For kubectl delete you always need to specify the resource type (kubectl delete pod hello-minikube in this case) or the fully qualified name (pod/hello-minikube)

@medyagh
Copy link
Member

medyagh commented Sep 16, 2020

Hi @@PzaZZ-8899 have you tried the suggstion by sharif ?

I haven't heard back from you, I wonder if you still have this issue?
Regrettably, there isn't enough information in this issue to make it actionable, and a long enough duration has passed, so this issue is likely difficult to replicate.

I will close this issue for now but please feel free to reopen whenever you feel ready to provide more information.

@medyagh medyagh closed this as completed Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

3 participants