外加本地OSX系统的配置教程:
http://blog.samemoment.com/articles/kubernetes/
这样就能够创建最基本的minikube环境。
搭建完成之后,可以进行最基本的上手练习
# 这里的ip地址是你在局域网中的ip,端口是HTTP_PROXY的端口,注意,在配置的时候,需要打开0.0.0.0的访问权限,不然会无法使用
minikube start \
--docker-env HTTP_PROXY=http://192.168.31.147:1087 \
--docker-env HTTPS_PROXY=https://192.168.31.147:1087
kubectl create deployment nginx --image=nginx
kubectl get deployments
返回结果
Name: nginx
Namespace: default
CreationTimestamp: Wed, 12 Dec 2018 18:47:17 +0800
Labels: app=nginx
Annotations: deployment.kubernetes.io/revision: 1
Selector: app=nginx
Replicas: 1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 25% max unavailable, 25% max surge
Pod Template:
Labels: app=nginx
Containers:
nginx:
Image: nginx
Port: <none>
Host Port: <none>
Environment: <none>
Mounts: <none>
Volumes: <none>
Conditions:
Type Status Reason
---- ------ ------
Progressing True NewReplicaSetAvailable
Available True MinimumReplicasAvailable
OldReplicaSets: <none>
NewReplicaSet: nginx-7d7cbfc4f (1/1 replicas created)
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ScalingReplicaSet 24m deployment-controller Scaled up replica set nginx-7d7cbfc4f to 1
如果启动成功,可以看到 1/1创建成功的消息
网友评论