部署后, 在k8s中无法进行部署,需要一些输入才能清除
$ kubectl describe deployment portainer
Name: portainer
Namespace: default
CreationTimestamp: Fri, 26 Jul 2019
Labels: app=portainer
Annotations:
deployment.kubernetes.io/revision: 1
Selector: app=portainer
Replicas: 1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 1 max unavailable, 1 max surge
Pod Template:
Labels: app=portainer
Containers:
portainer:
Image: portainer
Port: 9000/TCP
Host Port: 0/TCP
Command:
-H unix:///var/run/docker.sock --ssl --sslcert /certs/ssl.crt --sslkey /certs/ssl.key
Environment:
Mounts:
./build_1.5.1/certs:/certs:z from certs (rw)
/var/run/docker.sock:/var/run/docker.sock from jenkins-home (rw)
portainer_data:/data from portainer (rw)
Volumes:
jenkins-home:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit:
certs:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit:
portainer:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit:
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
OldReplicaSets: portainer-65656896b8 (1/1 replicas created)
NewReplicaSet:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ScalingReplicaSet 100s deployment-controller Scaled up replica set portainer-65656896b8 to 1
$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
portainer 0/1 1 0 110s
$ kubectl describe deployment portainer
Name: portainer
Namespace: default
CreationTimestamp: Fri, 26 Jul 2019 12:49:47 +0000
Labels: app=portainer
Annotations: deployment.kubernetes.io/revision: 1
Selector: app=portainer
Replicas: 1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 1 max unavailable, 1 max surge
Pod Template:
Labels: app=portainer
Containers:
portainer:
Image: portainer
Port: 9000/TCP
Host Port: 0/TCP
Command:
-H unix:///var/run/docker.sock --ssl --sslcert /certs/ssl.crt --sslkey /certs/ssl.key
Environment: <none>
Mounts:
./build_1.5.1/certs:/certs:z from certs (rw)
/var/run/docker.sock:/var/run/docker.sock from jenkins-home (rw)
portainer_data:/data from portainer (rw)
Volumes:
jenkins-home:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
certs:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
portainer:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
OldReplicaSets: portainer-65656896b8 (1/1 replicas created)
NewReplicaSet: <none>
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ScalingReplicaSet 114s deployment-controller Scaled up replica set portainer-65656896b8 to 1
</code></pre>
# This is your Editor pane.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: portainer
spec:
replicas: 1
template:
metadata:
labels:
app: portainer
spec:
containers:
- name: portainer
image: portainer
command: [-H unix:///var/run/docker.sock --ssl --sslcert /certs/ssl.crt --sslkey /certs/ssl.key]
securityContext:
privileged: true
ports:
- containerPort: 9000
volumeMounts:
- name: jenkins-home
mountPath: "/var/run/docker.sock:/var/run/docker.sock"
- name: certs
mountPath: "./build_1.5.1/certs:/certs:z"
- name: portainer
mountPath: "portainer_data:/data"
volumes:
- name: jenkins-home
emptyDir: {}
- name: certs
emptyDir: {}
- name: portainer
emptyDir: {}
$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
portainer 0/1 1 0 6m26s