Long story short
My deployment of the chart fails; kubectl reports a repeating restart and error backoff for the secon container.
Description
start minikube and install canvas
Deploying on an Azure VM centos 8 withi mninikube. My minikube instance is started with
minikube start --addons registry ingress --insecure-registry "10.0.0.0/8","192.168.0.0/16"
I then install canvas using the script
./install_canvas.sh
kubectl reports canvas is unavailable
Then kubectl reports that canvas is unavailable
`kubectl get deployment`
NAME READY UP-TO-DATE AVAILABLE AGE
canvas-keycloak 1/1 1 1 5s
oda-controller-ingress 0/1 1 0 5s
kubectl get pods
NAME READY STATUS RESTARTS AGE
canvas-keycloak-7874b487c9-bf5nj 0/1 Error 1 57s
oda-controller-ingress-85689ccbd6-4zfg2 1/2 NotReady 3 57s
`kubectl describe pod oda-controller-ingress-85689ccbd6-4zfg2
Name: oda-controller-ingress-85689ccbd6-4zfg2
Namespace: default
Priority: 0
Node: minikube/192.168.49.2
Start Time: Thu, 24 Jun 2021 14:44:22 +0000
Labels: app=oda-controller-ingress
app.kubernetes.io/instance=canvas
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=controller
helm.sh/chart=controller-0.1.0
pod-template-hash=85689ccbd6
Annotations:
Status: Running
IP: 172.17.0.6
IPs:
IP: 172.17.0.6
Controlled By: ReplicaSet/oda-controller-ingress-85689ccbd6
Containers:
oda-controller-ingress:
Container ID: docker://0e196964003ef2b4a9aa6ad7233d2dd99fc83e9d3112c83f45eebab93d39927a
Image: tmforumodacanvas/component-controller:master
Image ID: docker-pullable://tmforumodacanvas/component-controller@sha256:bc5ecb5626b26eee3abbdb589288a6c48a3153bf9025acf4df1365642e4313d3
Port:
Host Port:
State: Running
Started: Thu, 24 Jun 2021 14:44:24 +0000
Ready: True
Restart Count: 0
Environment Variables from:
canvas-configmap ConfigMap Optional: false
canvas-secret Secret Optional: false
Environment:
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from odacomponent-account-token-46rsb (ro)
seccon:
Container ID: docker://e6342cc89416c7178e55777a8fd0bda20881bf696c23396a3863195e6d25bc4b
Image: tmforumodacanvas/security-listener:master
Image ID: docker-pullable://tmforumodacanvas/security-listener@sha256:d686f44b910558ba2432856f9e2e4e12c9fdf8330f15df41ee28815073feee71
Port: 5000/TCP
Host Port: 0/TCP
State: Terminated
Reason: Completed
Exit Code: 0
Started: Thu, 24 Jun 2021 14:46:04 +0000
Finished: Thu, 24 Jun 2021 14:46:04 +0000
Last State: Terminated
Reason: Completed
Exit Code: 0
Started: Thu, 24 Jun 2021 14:45:12 +0000
Finished: Thu, 24 Jun 2021 14:45:12 +0000
Ready: False
Restart Count: 4
Environment Variables from:
canvas-configmap ConfigMap Optional: false
canvas-secret Secret Optional: false
Environment:
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from odacomponent-account-token-46rsb (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
odacomponent-account-token-46rsb:
Type: Secret (a volume populated by a Secret)
SecretName: odacomponent-account-token-46rsb
Optional: false
QoS Class: BestEffort
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
Normal Scheduled 104s default-scheduler Successfully assigned default/oda-controller-ingress-85689ccbd6-4zfg2 to minikube
Normal Pulling 103s kubelet Pulling image "tmforumodacanvas/component-controller:master"
Normal Pulled 102s kubelet Successfully pulled image "tmforumodacanvas/component-controller:master" in 1.104600265s
Normal Created 102s kubelet Created container oda-controller-ingress
Normal Started 102s kubelet Started container oda-controller-ingress
Normal Pulled 101s kubelet Successfully pulled image "tmforumodacanvas/security-listener:master" in 1.051713286s
Normal Pulled 99s kubelet Successfully pulled image "tmforumodacanvas/security-listener:master" in 1.074514777s
Normal Pulled 81s kubelet Successfully pulled image "tmforumodacanvas/security-listener:master" in 1.030029787s
Warning BackOff 68s (x5 over 98s) kubelet Back-off restarting failed container
Normal Pulling 55s (x4 over 102s) kubelet Pulling image "tmforumodacanvas/security-listener:master"
Normal Created 54s (x4 over 101s) kubelet Created container seccon
Normal Started 54s (x4 over 100s) kubelet Started container seccon
Normal Pulled 54s kubelet Successfully pulled image "tmforumodacanvas/security-listener:master" in 1.06064275s`
Counter example
If I comment out the seccon container from the template,
spec:
serviceAccountName: odacomponent-account
containers:
- name: oda-controller-ingress
image: {{.Values.deployment.compconimage}}
imagePullPolicy: Always
envFrom:
- configMapRef:
name: {{ .Release.Name }}-configmap
- secretRef:
name: {{ .Release.Name }}-secret
# - name: seccon
# image: {{.Values.deployment.secconimage}}
# imagePullPolicy: Always
# envFrom:
# - configMapRef:
# name: {{ .Release.Name }}-configmap
# - secretRef:
# name: {{ .Release.Name }}-secret
# ports:
# - name: seccon
# containerPort: 5000
then kubectl reports a running deployment of canvas as expected
$ kubectl get deployment
NAME READY UP-TO-DATE AVAILABLE AGE
canvas-keycloak 1/1 1 1 31s
oda-controller-ingress 1/1 1 1 31s
Environment
kopf --version
-bash: kopf: command not found
$ pip show kopf
-bash: pip: command not found
kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:59:11Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:32:49Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
$ python --version
-bash: python: command not found
$ python3 --version
Python 3.6.8
cat /etc/os-release file
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"