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
[root@localhost ~]# 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
实例
[root@localhost ~]# kubectl create deployment hello-minikube --image=registry.cn-hangzhou.aliyuncs.com/google-containers/echoserver:1.4
deployment.apps/hello-minikube created
[root@localhost ~]# kubectl expose deployment hello-minikube --type=NodePort --port=8080
service/hello-minikube exposed
[root@localhost ~]# 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...
网友评论