Here is my YAML file :
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: tomcat-deployment
spec:
selector:
matchLabels:
app: tomcat
replicas: 1
template:
metadata:
labels:
app: tomcat
spec:
containers:
- name: tomcat
image: tomcat:9.0
ports:
- containerPort: 8080
When I run the command kubectl apply -f ./deployment.yaml
, I got the following error : Unable to connect to the server: dial tcp 192.168.99.100:8443: getsockopt: no route to host
.
How can I fix that problem?
With kubectl version
, it got Client Version:
version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}