deployment


Issue with Pod selection using selector.matchExpressions in Kubernetes Deployment


I've got a problem with Deployments which uses both matchLabels and matchExpressions in the spec.selector. like:
...
spec:
replicas: 3
selector:
matchLabels:
run: myapp
matchExpressions:
- {key: exclude, operator: NotIn, values: [true]}
...
Now, I launch this deployment with say 3 replica's. Then I go to one pod and add a label: exclude=true.
What I expect to happen
The pod to which I added the label exclude=true is taken out of the Deployment & ReplicaSet and a new pod is spun up, so the Deployment/ReplicaSet still have 3 pods (showing 3/3 in the dashboard)
What I see happening
A new pod is spun up, but the pod to which I added the label is NOT taken out of the Deployment/ReplicaSet: those now show 4/3 in the dashboard
questions
Is this expected behavior or a bug? Am running the latest MiniKube (on Windows).
If I update the run label to something else but 'myapp' on the pod to which I added label exclude=true, then the pod is taken out of the Deployment/ReplicaSet (dashboard shows 3/3)
Any thoughts?
Turns out the selectors work properly, the issue is just that Kubernetes Dashboard/WebUI reports the wrong numbers.
Filed an issue with Kubernetes Dashboard now: https://github.com/kubernetes/dashboard/issues/1944

Related Links

Build upgrade release with edeliver and distillery
Ansible staggered deployment/dividing inventory [duplicate]
Local configuration in deployed Clojure apps
Vue-cil distributed app deploy error on digital ocean - TypeError: t is not a function
Deploy a Tensorflow model avoiding Tensorflow Serving
cant delete pod using kubctl delete pod <pod>
How to deploy an Office VSTO add-in using Visual Studio 2017
Deployment of akka-http app with frontend app
Set excluded files using pattern or wildcard in PyCharm (remote host)
Classic usecases for different deployment environments
RPC Server is unavailable when trying to deploy pocket pc application
Blue Green Deployments vs Rolling Deployments?
Cannot access website deployed on 5gbfree.com
Weblogic error: javax.naming.NameNotFoundException: Unable to resolve 'impala'
WildFly 10.1.0.Final | Loading page during deployment | default-response-code is ignored
Deploying a plain bundle.js on a no-node-supported web server

Categories

HOME
hook
debugging
appx
relay
cplex
react-router
leon
jxls
facebook-messenger-bot
communication
node-pdfkit
user-input
spring-xd
google-cloud-spanner
zend-framework3
windows-server-2012
designer
functional-testing
mps
crosstab
android-widget
centos6.5
url-scheme
user-interaction
fifo
jaxb2
fabric8
google-rich-snippets
xquery-3.0
jspresso
gtrendsr
perlin-noise
caret
mapdb
multilingual
twitch
azure-ml
eclipse-scout
nand2tetris
angular-resource
errordocument
clean-architecture
drupal-6
bind9
sonarlint-vs
orthogonal
angular-strap
removechild
mikroc
master-slave
ipconfig
unity-networking
sdhc
jmeter-maven-plugin
security-testing
splash
apache-commons-fileupload
createprocessasuser
nsight
directoryservices
asp.net-web-api-odata
php-5.4
ceil
seaside
datagridviewcolumn
mcts
industrial
dbconnection
bulkloader
file-locking
seed
word-processor
datawindow
whoosh
window-management
external-accessory
gcj
fixed-width
premature-optimization
gacutil
genealogy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App