[ Kube 6 ] Running Docker Containers in Kubernetes Cluster

24
40



Running Docker Containers in Kubernetes Cluster.

In this video, I will show you how to run simple containers quickly and easily inside Kubernetes Cluster.

Github: https://github.com/justmeandopensource/kubernetes

For any questions/issues/feedback, please leave me a comment and I will get back to you as quickly as I can. If you liked this video, please share it with your friends and don’t forget to subscribe to my channel.

Hope you found this video informative and useful. Thanks for watching.

If you wish to support me:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=F8FN37PAD629Y&source=url

#kubernetes #k8s #justmekubernetes #docker #learnkubernetes

source

Previous articleBelajar Docker untuk Pemula – 18 Integrasi Container dengan Network
Next articleJobs tips introduction to data warehouse automation

40 COMMENTS

  1. Hi i was following your tutorial. They are all great. I managed to configure the cluster by manually following your instructions. Automatic vagrant didn't work for me as i had to do some tweaks in the instructions. Right now i am getting following error.

    [email protected]:~/kubernetes-manual/vagrant-provisioning$ kubectl get nodes
    NAME STATUS ROLES AGE VERSION
    kmaster Ready master 14h v1.18.5
    kworker1 Ready <none> 14h v1.18.5
    kworker2 Ready <none> 13h v1.18.5

    kubectl run nginx — image nginx
    "NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
    pod/nginx 1/1 Running 0 54s 192.168.77.133 kworker2 <none> <none>

    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
    service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 14h <none>

    kubectl port-forward nginx 8080:80
    error: error upgrading connection: unable to upgrade connection: pod does not exist"

    I am learning kubernetes so sorry for simple questions, but i think IP of pod should be like 10. something right. Also when i don't see any deployment when i run image just pod and there is no random string with pod name like you have in your current video. Any idea what i might be doing wrong here.

  2. Hi Venkat,
    I've a question regarding how to set up different different pod networks, as I can see that you've used two different range for two worker nodes, If you could tell me how you did that will be great help for me.
    Thanks in Advance 🙂

  3. Hi the tutorial is cool but I have one query that is I have created one master and two workers cluster creation is successful and I have deploy the Prometheus but coming to UI expose the service is cluster IP I change it to loadbalencer it's not working and I have used port forward also not working it's shows like sevice not found

  4. Thanks for the awesome tutorial ,Just one doubt i excute same command as you did but it didnot create any deployment or replicaset,Just wondering why ?

    [[email protected] ~]$ kubectl get nodes

    NAME STATUS ROLES AGE VERSION

    kmaster.example.com Ready master 32h v1.18.2

    kworker1.example.com Ready <none> 32h v1.18.2

    kworker2.example.com NotReady <none> 32h v1.18.2

    [[email protected] ~]$ watch kubectl get all -o wide

    Every 2.0s: kubectl get all -o wide Mon May 11 06:35:18 2020

    NAME READY STATUS RESTARTS AGE IP NODE

    NOMINATED NODE READINESS GATES

    pod/myshell 1/1 Running 1 7m9s 192.168.33.193 kworker1.example

    .com <none> <none>

    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTO

    R

    service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 32h <none>

  5. Hi Venkat, Thanks for the video…..service functionality works seamlessly….but one question in the browser i have to type in node1IP and NodePort which works well but when i type in kworker1:NodePort it does not work…Checked the config in /etc/hosts of master and worker nodes and everything is in place….can you let me know the reason of the same…

  6. Hi sir
    getting error while deleting pod

    PS C:UsershpDownloadskubernetes-masterkubernetes-mastervagrant-provisioning> kubectl delete deploy myshell

    Error from server (NotFound): deployments.apps "myshell" not found

    PS C:UsershpDownloadskubernetes-masterkubernetes-mastervagrant-provisioning> kubectl get all -o wide

    NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS G

    S

    pod/myshell 1/1 Running 0 14m 192.168.33.193 kworker1.example.com <none> <none>

    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR

    service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 25h <none>

    PS C:UsershpDownloadskubernetes-masterkubernetes-mastervagrant-provisioning> kubectl delete deploy myshell

    Error from server (NotFound): deployments.apps "myshell" not found

    PS C:UsershpDownloadskubernetes-masterkubernetes-mastervagrant-provisioning>

  7. Hi Venkat, I am total new to vagrant. After watching your fantastic video thought to ask you if you could tell me on how can I run same setup with hyperv. I tried to use this command – vagrant up –provider=hyperv and also changed your script from virtualbox to hyperv
    When I run the setup, I get below log lines. I think, in hyperv it is not able to create private network from vagrant somehow. But would like to know any workaround. Thanks in advance!
    kmaster: [TASK 3] Deploy Calico network

    kmaster: Unable to connect to the server: dial tcp 172.42.42.100:6443: i/o timeout

    kmaster: [TASK 4] Generate and save cluster join command to /joincluster.sh

    kmaster: W0217 05:04:27.716658 13007 validation.go:28] Cannot validate kube-proxy config – no validator is available

    kmaster: W0217 05:04:27.716747 13007 validation.go:28] Cannot validate kubelet config – no validator is available

  8. Hello, thanks for making these videos. They are really helpful!
    I just started learning K8s few weeks ago.
    I ran into a different result when trying to delete the deployment.
    I followed your instructions… all the way from your first K8s video.

    Here's what I got:
    $ kubectl run myshell it –image busybox – sh
    Error from server (AlreadyExists): replicationcontrollers "myshell" already exists
    $ kubectl delete deploy myshell
    Error from server (NotFound): the server could not find the requested resource
    $ kubectl get deploy
    NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
    calico-kube-controllers 1 1 1 1 19d
    coredns 2 2 2 2 19d

    It was also weird how I was able to delete the docker images and containers on worker1 but not on worker2. The pods kept coming back on worker2. So then I went back to the actual error message and found out about some commands I used to solve my problem.

    $ kubectl get rc
    NAME DESIRED CURRENT READY AGE
    myshell 1 1 1 3d
    nginx 1 1 1 3d
    $ kubectl delete rc myshell
    replicationcontroller "myshell" deleted
    $ kubectl delete rc nginx
    replicationcontroller "nginx" deleted
    '$ kubectl get rc
    No resources found.

    After that, I was able to permanently delete the containers and images on worker2.
    Would you know why I got that error message as opposed to what you got?
    Thanks again.

  9. Hi, great videos first. i have a doubt,..while doing port forwarding for nginx container, you provided 8080 for host machine. is it virtual machine port or the physical base machine port (where you are running virtual machines)? or both or same? or we are skipping virtual machine, as we are interacting to the kubernetes from the physical base machine. ?

  10. Thanks For the wonderful series.. I have a question I have setup the cluster on windows by vagrant up video. Now 3 machines I can see in Oracle virtualBox. Now when I run the docker images, it shows docker not found.. Now Can you help me as I have don't any Unix/Linux(only window machine I have) machine But I have oracle virtual box with linux machine, so How can I create three node cluster with this(unix on virtualbox) machine.