国内环境部署使用minikube部署k8s
程序员文章站
2022-07-13 21:34:57
...
minikube start --vm-driver=none --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
安装helm客户端
##[https://helm.sh/docs/intro/install/](https://helm.sh/docs/intro/install/)
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
查看clusters
[[email protected] ~]# kubectl config view
apiVersion: v1
clusters:
- cluster:
certificate-authority: /root/.minikube/ca.crt
server: https://10.0.2.15:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
user:
client-certificate: /root/.minikube/client.crt
client-key: /root/.minikube/client.key
实例
[[email protected] ~]# kubectl create deployment hello-minikube --image=registry.cn-hangzhou.aliyuncs.com/google-containers/echoserver:1.4
deployment.apps/hello-minikube created
[[email protected] ~]# kubectl expose deployment hello-minikube --type=NodePort --port=8080
service/hello-minikube exposed
[[email protected] ~]# minikube service hello-minikube
|-----------|----------------|-------------|------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|-----------|----------------|-------------|------------------------|
| default | hello-minikube | | http://10.0.2.15:30080 |
|-----------|----------------|-------------|------------------------|
* Opening service default/hello-minikube in default browser...
上一篇: python时间格式
推荐阅读
-
详解如何使用Docker快速部署ELK环境(最新5.5.1版本)
-
使用k8s部署Django项目的方法步骤
-
使用yum快速部署Oracle安装环境(11g)
-
使用pm2部署node生产环境的方法步骤
-
使用SAE部署Python运行环境的教程
-
k8s + docker + Jenkins使用Pipeline部署SpringBoot项目时Jenkins错误集锦
-
使用Rancher在K8S上部署高性能PHP应用程序的教程
-
ubuntu20.04下使用juju+maas环境部署k8s-7-使用graylog和Prometheus2监控k8s集群-4-prometheus2部署
-
国内环境部署使用minikube部署k8s
-
centos7内网环境部署(kubernates)k8s环境-rancher部署