What is Kubernetes
Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts, providing container-centric infrastructure.
With Kubernetes, you are able to:
- Deploy your applications quickly and predictably.
- Scale your applications on the fly.
- Seamlessly roll out new features.
- Optimize use of your hardware by using only the resources you need.
For more information Click Here
Pre-requisites
- 2/3 VMware PhotonOS VM with docker enabled and configured as per my earlier post – Click Here
- For Lab setup please allow everything in firewall using following commands
iptables -I INPUT -j ACCEPT
- Internet Connection on all 3 VMs
My Environment Setup
I have 3 VMs
- 1 – Photon Master (hostname – photon-os)
- 2 – Worker or Minion Nodes (hostname(s) – photon-node, photon-node01)
Installation of Kubernetes
Execute following command on all 3 nodes. You can also use –y switch to accept by default
tdnf install kubernetes
Size of the package is about 500MB so it will take time depending upon Internet Speed. I haven’t tried offline method
Configuration
Modify /etc/hosts on all hosts
Add master and node to /etc/hosts on all machines (not needed if the hostnames are already in DNS). Make sure that communication works between photon-master and photon-node by using a utility such as ping
Modify Kubernetes Config on all hosts
Edit /etc/kubernetes/config on all machines as per following
Before
After
Configure Kubernetes on Master
Edit /etc/kubernetes/apiserver as per following
Before
After
Start Kubernetes Services on Master
I will be enabling following services on master as I want Master to be worker/minion node as well
- etcd
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- kube-proxy
- kubelet
If you don’t require master to be worker/minion node then don’t include following 2 service
- kube-proxy
- kubelet
for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler kube-proxy kubelet; do
systemctl restart $SERVICES
systemctl enable $SERVICES
systemctl status $SERVICES
done
|
In case you run into issues with kube-apiserver you will need to reboot the VM
Create node.json for worker/minion nodes
Create Node objects
Make a node object internally in your Kubernetes cluster by running the following command
Verify Node objects
Status will show Unknown and its normal behavior as we have not done any configuration on worker/minion node
Configure Kubernetes on Worker/Minion Node
Modify Kubelet Config
Edit /etc/kubernetes/kubelet as per following
Before
After
Enable and Start Services
Verify Nodes on Master
Verify Kubernetes Setup on Master
References
In the next blog post I will be configuring Kubernetes Dashboard on PhotonOS
Hi Munish,On starting services on master, kube-apiserver is getting failed, Rebooting the VM doesn't help.Any other changes required.
I think, we should add server name while creating node objectskubectl create -f /root/node.json -s http://K8S-master:8080
How to install kubeadm on Photon OS?
i'm here to learn more about DevOps Thanks for Sharing Here you can check best DevOps Online Training Institute DevOps Online Training
I'm very happy to search out this information processing system. I would like to thank you for this fantastic read!! Docker and Kubernetes Training
when i run kubectl create -f /node.json i get The connection to the server dockerhost:8080 was refused – did you specify the right host or port?any help ??
This comment has been removed by the author.
Nice Blog..Thanks for sharing very useful Blog…Docker and Kubernetes TrainingDocker Online TrainingDocker Training
Thanks For Sharing The Information The Information Shared Is Very Valuable Please Keep Updating Us Time Just Went On Reading The article Python Online Course Hadoop Online Course Aws Online Course Data Science Online Course
Thanks for the great article this is very useful info thanks for the wonderful post.Best Devops Training Institute
Thank your valuable content.we are very thankful to you.one of the recommended blog.which is very useful to new learners and professionals.content is very useful for hadoop learnersBest ASP.NET MVC Online Training InstituteBest Spring Online Training InstituteBest Devops Online Training Institute Best Datascience Online Training Institute Best Oracle Online Training Institute Best AWS Online Training Institute Best AngularJS Online Training Institute
I gather more information through this article, so please keep me informed of any update in this regard. For more relevant articles click on: how to recover deleted datacustom filedisk image softwareretrieve deleted files windowsdiskdiggerdiskdigger prousb drivedownload diskdigger
yeah, the same problem, kube-apiserver is getting failed. It's weird that there is no any proper documentation, blog or anything like that to install kubernetes on photon os. All I can find outdated/discontinued installation methods. The installation is not defined clearly even in Photon OS documentation.
Thank you for Sharing Excellent articleDocker and Kubernetes Training in Hyderabad
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website top angular js online training
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website workday studio online trainingbest workday studio online trainingtop workday studio online training
valuable contentDocker and Kubernetes Training in HyderabadKubernetes Online TrainingDocker Online Training
I like your post very much. It is very useful for my research. I hope you can share more info about this. Keep postingWorkday Integration trainingWorkday Studio trainingTableau online trainingTableau Server trainingTableau Advanced trainingETL Testing Training
Your blog is in a convincing manner, thanks for sharing such an information with lots of your effort and timekubernetes online trainingkubernetes online course
Awesome informations that you have shared for us.I eagerly waiting for more updates in future. AWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery
blog commenting : Thanks for sharing this information. I really Like Very Much.top angular js online training
thanks for sharing your ideas with us and add more info. DevOps Training in Chennai | DevOps Training in anna nagar | DevOps Training in omr | DevOps Training in porur | DevOps Training in tambaram | DevOps Training in velachery
Its really helpful for the users of this site. I am also searching about these type of sites now a days. So your site really helps me for searching the new and great stuff. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website Salesforce Training in Chennai | Certification | Online Course | Salesforce Training in Bangalore | Certification | Online Course | Salesforce Training in Hyderabad | Certification | Online Course | Salesforce Training in Pune | Certification | Online Course | Salesforce Online Training | Salesforce Training
Thanks for sharing this information. I really Like Very Much.top angular js online training
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my websiteangular js online trainingbest angular js online trainingtop angular js online training
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my websiteangular js online trainingbest angular js online trainingtop angular js online training
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my websiteangular js online trainingbest angular js online trainingtop angular js online training
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my websiteangular js online trainingbest angular js online trainingtop angular js online training