Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.

More details can be found at https://github.com/kubernetes/minikube

Step 1 - Start Minikube

Minikube has been installed and configured in the environment. Check that it is properly installed, by running the minikube version command:

minikube version

Start the cluster, by running the minikube start command:

minikube start

Great! You now have a running Kubernetes cluster in your online terminal. Minikube started a virtual machine for you, and a Kubernetes cluster is now running in that VM.

Step 2 - Cluster Info

The cluster can be interacted with using the kubectl CLI. This is the main approach used for managing Kubernetes and the applications running on top of the cluster.

Details of the cluster and its health status can be discovered via

kubectl cluster-info

To view the nodes in the cluster using

kubectl get nodes

If the node is marked as NotReady then it is still starting the components.

This command shows all nodes that can be used to host our applications. Now we have only one node, and we can see that it’s status is ready (it is ready to accept applications for deployment).

Step 3 - Deploy Containers

With a running Kubernetes cluster, containers can now be deployed.

Using kubectl run, it allows containers to be deployed onto the cluster -

kubectl run first-deployment --image=katacoda/docker-http-server --port=

The status of the deployment can be discovered via the running Pods -

kubectl get pods

Once the container is running it can be exposed via different networking options, depending on requirements. One possible solution is NodePort, that provides a dynamic port to a container.

kubectl expose deployment first-deployment --port= --type=NodePort

The command below finds the allocated port and executes a HTTP request.

export PORT=$(kubectl get svc first-deployment -o go-template='{{range.spec.ports}}{{if .nodePort}}{{.nodePort}}{{"\n"}}{{end}}{{end}}') echo "Accessing host01:$PORT" curl host01:$PORT

The results is the container that processed the request.

Step 4 - Dashboard

The Kubernetes dashboard allows you to view your applications in a UI. In this deployment, the dashboard has been made available on port 30000.

The URL to the dashboard is https://2886795296-30000-ollie02.environments.katacoda.com/

最新文章

  1. ASP.NET MVC系列:从Controller访问Model数据
  2. 用Python开始机器学习(7:逻辑回归分类) --好!!
  3. Fastreport使用经验(转)在Delphi程序中访问报表对象
  4. Java工作队列和线程池
  5. JavaScript 类型判断 —— typeof 以及 instanceof 中的陷阱
  6. 23设计模式(3):Abstract Factory模式
  7. Linux(Ubuntu)使用日记------Mysql编码(utf-8)的设置
  8. 查看oracle表空间
  9. [20171113]修改表结构删除列相关问题4.txt
  10. python全栈开发day21-2 几个装饰器总结
  11. [Aaronyang] 写给自己的WPF4.5 笔记8[复杂数据处理三步曲,数据视图精讲1/3]
  12. 个人知识管理PKM:收集、消化、应用、创新
  13. 一套海量在线用户的移动端IM架构设计实践分享(含详细图文)(转)
  14. Android Studio 之 导入Eclipse项目常见问题及解决方案
  15. 字母统计-map
  16. bugfree 数据库配置 显示No such file or directory
  17. Centos7 通过SSH使用密钥实现免密登录
  18. 4G的添加
  19. JAVA 导出 Excel, 将Excel下载到本地
  20. python科学计算和可视化学习报告

热门文章

  1. tomcat下载、安装
  2. Python3 小工具-ARP欺骗
  3. MySQL Proxy使用
  4. canvas学习(二):渐变与曲线的绘制
  5. wpa_supplicant与kernel交互
  6. 解读:未来30年新兴科技趋势报告(AI Frist,IoT Second)
  7. 软件工程第二周PSP
  8. Pipeline组Beta版本发布说明
  9. PMS
  10. concurrenthashmap jdk1.8